我正在致力于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;
}
});
});
}
});
}
请看代码,这是我所做的,可能是什么问题?
如果需要更多详细信息,请让我知道。