2014-10-20 26 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'}); 

     } 
    }); 
} 

回答