如果我已经连接到fb,bt没有授权应用它打开弹出窗口2次...我尝试下面的代码...控制台没有错误....
if (response.authResponse) {
console.log("user is already logged in and connected");
console.log("Fetching Info..... - already logged in");
FB.api('/me', function(info) {
login(response, info);
});
// button.onclick = function() {
// FB.logout(function(response) {
// logout(response);
// });
// };
} else {
console.log("user is not connected to your app or logged out");
$('.login-with-fb-instant').click(function(e) {
e.preventDefault();
console.log("Fetching Info..... - logged out");
$('.fb-loader').show();
FB.login(function(response) {
if (response.authResponse) {
FB.api('/me', function(info) {
login(response, info);
});
} else {
console.log("user cancelled login or did not grant authorization");
$('.fb-loader').hide();
}
}, {
scope : 'email,user_birthday,status_update,publish_stream,user_about_me'
});
});
}`enter code here`