Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the Facebook login not asking for correct permissions?

I use Facebook login using FB.login (and I don't want to use the Facebook login button). My problem is that after login, the Facebook dialog don't show the listed permission, as follows.

FB.login(function (response) {
   if (response.status == "connected") {
      //alert(" connected ");
   }
   else {
       //alert(" not connected ");
   }
}, { scope: 'email' });

The Facebook dialog show "Access my basic information" only. How do I fix this problem?

Note: if I try the Facebook login, it shows the permission correctly.

Note 2: the response after the user clicks Allow is:

User cancelled login or did not fully authorize.

like image 256
Hiyasat Avatar asked Oct 10 '11 10:10

Hiyasat


1 Answers

That's because of a mistake in the official documentation. The property name for the permissions is not "scope", but "perms":

FB.login(function (response) {
   if (response.status == "connected") {
      //alert(" connected ");
   }
   else {
       //alert(" not connected ");
   }
}, { perms: 'email' });
like image 85
Julien L Avatar answered Nov 13 '22 16:11

Julien L