我正在使用ios的cordova facebook插件。
FB.getLoginStatus(function(response) {
console.log(JSON.stringify(response));
});
FB.login(
function(response)
{});
我收到此错误{"status":"unknown","authResponse":null}
答案 0 :(得分:0)
正如Facebook文档中所述,FB.getLoginStatus将返回三个可能的响应:
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
// the user is logged in and has authenticated your app
// show Open Graph related features here. Such as Frictionless sharing
} else if (response.status === 'not_authorized') {
// the user is logged in to Facebook, but has not authenticated your app
// show user Facebook status
} else {
// the user isn't logged in to Facebook.
// Hide all Facebook status mockups.
}
});