This is the first question I’ve posted here, but have found stack more than useful in the past. I should also say I have searched for many hours, read many questions already asked and am still struggling.
So, I’m writing an FB app and my problem is with the JS SDK, I have set the permissions in the developer area of FB and have also specified the “scope” in FB.login, however on a clean (brand new account) version of FB, I am not being asked for the permissions I have specified, specifically publish_stream and photo_upload. Without this working properly, all images uploaded require “approving” by the user in their photo album, which is annoying and users are unlikely to do.
When I check the permissions on my developer account, I have the correct permissions, but cannot for the life of my understand why there is a difference between my two accounts.
Here is my login function with “scope” specified:
function login() {
FB.login(function(response) {
if (response.authResponse) {
// connected
var access_token = FB.getAuthResponse()['accessToken'];
console.log('Access Token = '+ access_token);
testAPI();
} else {
// cancelled
}
}, {scope:'publish_stream,photo_upload'});
}
Any help would be appreciated and if I have missed any info, give me a nudge.
May be you are using the old SDK and that’s why its not working. Earlier the property name for the permissions was not “scope”, but “perms”, so try out with “perms” and check if its working.