我正在致力於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;
}
});
});
}
});
}
請看代碼,這是我所做的,可能是什麼問題?
如果需要更多詳細信息,請讓我知道。