2012-03-17 37 views
2

我正在致力于Facebook OAuth。我能够从Facebook账户获得一些电子邮件,而其中一些电子邮件未来。无法从facebook获得所有电子邮件OAuth

可能是什么问题。

function login() { 
     FB.init({ 
      appId: '<%=ConfigurationManager.AppSettings["facebookAPI"].ToString() %>', 
      cookie: true, 
      status: true, xfbml: true 
     }); 
     FB.login(function (response) { 
      //alert("login"); 
      //if (response.session) { 
      if (response) { 
       //alert(response); 
       //alert("login"); 
       var url = '/me?fields=name,email'; 
       FB.api(url, function (response) { 

        //var image = 'http://graph.facebook.com/' + response.id + '/picture'; 

        // alert(response.name); 
        //alert(response.email); 
        $.ajax({ 
         type: "POST", 
         url: "Login.aspx/SaveFacebookAutoSignUp", 
         data: "{ 'Name':'" + response.name + "', 'EmailId': '" + response.email + "'}", 
         contentType: "application/json; charset=utf-8", 
         dataType: "json", 
         success: function (data) { 
          // alert("You have successfully sign in.Please Wait, we redirect you in a second."); 
          window.location = '<%=ConfigurationManager.AppSettings["weburl"].ToString() %>' + "OAuth.aspx?userId=" + data.d; 
         } 

        }); 

       }); 

      } 
     }); 
    } 

请看代码,这是我所做的,可能是什么问题?

如果需要更多详细信息,请让我知道。

回答

1

电子邮件的详细信息是基于用户的隐私设置提供的。如果用户将他的电子邮件地址设置为不公开,那么Facebook不会获取此类数据。

其全部基于权限和隐私设置。

相关问题