How to request user permissions using facebook api in js?
how to request user permissions using facebook api in js? I want people to visit my site using facebook login. then I want to request facebook data from a visitor. now i can get data like this using js
FB.api('/100005658545226?fields=id,name,email') =>
{
"id": "100005658545226",
"name": "Mingfish Lin"
}
but there is no email in the json response, so I want to send a request to ask the user to allow this email permission. how can i make this work in js? for example, what cuts.
+1
source to share
1 answer
Call a login method with a callback and an options object with an array as a scope property, for example:
FB.login(callback, {scope: ['email']});
More information on Rights on Facebook
+3
source to share