2014-10-20 27 views
-1

我遇到从我们的网站用JavaScript登录FB帐户的问题。 登录很简单,我们定义了范围:email,user_birthdate,...我们需要什么。Facebook的登录与JavaScript - 服务器相关的问题?

在一台服务器上,我可以获得我们需要的所有信息,另一个只有基本信息,即:birthdate缺失以及家乡。 有什么办法可以防止这种情况发生?这可能是我错过了一些东西。 感谢您的建议。

   window.fbAsyncInit = function() { 
   FB.init({ 
   appId  : fb_app_id, // App ID 
   apiKey  : fb_app_secret, 
    channelURL : '', // Channel File, not required so leave empty 
   status  : false, // check login status 
    cookie  : true, // enable cookies to allow the server to access the session 
    oauth  : true, // enable OAuth 2.0 
    xfbml  : true, // parse XFBML 
    frictionlessRequests : true 
   }); 
    function login(){ 
     FB.getLoginStatus(function(response){ 
     if(response.status === 'connected' 
      || response.authResponse != null){ 
      FB_response(response); 
     } 
     else{ 
      FB.login(function(response) { 
       if(response.authResponse) { 
        //alert('connected'); 
        FB_response(response); 
       } 
       else { 
        // user is not logged in 
       } 
     },{scope:'email, user_about_me, user_birthday, user_hometown, user_location'}); 

     } 
    }); 
} 

回答