Reputation: 369
I have the following JS function:
<pre><code>
function fblogin() {
FB.login(function(response) {
if ( response.status === 'connected' ) {
objFacebookUser.token = response.authResponse.accessToken;
FB.api('/me', function(response) {
objFacebookUser.id = response.id;
connect( objFacebookUser );
});
} else if( response.status === 'not_authorized' ){
console.log('User cancelled login or did not fully authorize!');
} else {
console.log('User is not logged in!');
}
}, {scope:'{{$smarty.const.FACEBOOK_CONNECT_PERMS}}'});
}
</code></pre>
I have never had any problems with this until today. For some reason, one account I'm trying to use Facebook connect on will always throw "not_authorized" as the response.
I tried deleting the app from that account's applications. It would request to Allow permissions, I click allow and it throws "not_authorized" again. I'm totally stuck. Been reading on this for the whole day now without a solution. This doesn't happen to every account, but I need to get to the bottom of this.
Any help is greatly appreciated.
Upvotes: 0
Views: 324
Reputation: 369
Found the solution!
I was in Sandbox enabled mode. Make sure that Sandbox mode is DISABLED. Otherwise, you'll run into a lot of authentication issues.
Cheers! Armin
Upvotes: 3