Facebook oAuth: force email permission

How do sites such as StackOverflow and Untappd force users to accept their permissions?

When I tried with the JavaScript SDK, I used the scope object to request email addresses, but I continue to see “Edit the information you provide”, allowing the user not to provide his email address. I even tried following Manually to create an input stream with the same results.

Picture

enter image description here

Since we provide the user with the opportunity to register on the site through Facebook, we rely on the email address to create an account in our database.

However, sites like StackOverflow and Untappd do not offer such an option, I have to accept these permissions.

So what's the secret? How do I achieve this? Is this some kind of setting I'm looking at somewhere? Or is it necessary to "approve"?

+4
source share
2 answers

They use an old application created before the end of April 2014, then it was different. You can no longer force it, you can only check if the user has allowed permissions after entering the system with the flag return_scopes, for example:

https://developers.facebook.com/docs/reference/javascript/FB.login/v2.2

+13
source

, Facebook SDK V4.x: "" Facebook iOS SDK 4.x?

" " , , , "".

" " "" ( , ).

: , Facebook JS SDK:

FB.login(function(response) {
   console.log(response);
}, {
   scope: 'user_likes',
   auth_type: 'rerequest'
});
+3

All Articles