I have an application on a page tab that uses facebook javascript sdk. When a new user enters the application, I get the expected "Login to facebook" popup. I also have some advanced permissions that I entered in the FB.Login scope parameter. After users log in with facebook, I see a pop-up window with advanced permissions. The only problem is that the user skips extended permissions, the dialog returns access_token back, but it is not valid for extended permissions. Sample code below.
window.fbAsyncInit = function () {
FB.Canvas.setAutoGrow();
FB.init({
appId: facebookAppId,
status: true,
});
function updateFBInfo(response) {
console.log('updateResp:');
if (response.authResponse) {
FB.api('/me', function (info) {
displayUserInfo(info, response);
});
}
else {
FB.login(function (loginResponse) {
if (loginResponse.authResponse) {
FB.api('/me', function (info) {
displayUserInfo(info, loginResponse);
});
}
}, { scope: 'email,manage_pages,offline_access,publish_stream' });
}
}
FB.getLoginStatus(updateFBInfo);
};
, , ( - ), , acces_token ?