Facebook Graph API returns username

I used the graph graph api by asking "/ me" and it only returns the name and user ID. I know that it registers correctly because it returns the correct name.

Here is the javascript code snippet I used:

FB.login(function (response) { // handle the response FB.api('/me', function (usrresponse) { document.getElementById('inFbStatus').innerHTML = 'Successful login to Facebook'; console.log(JSON.stringify(usrresponse)); }); }, { scope: 'email, basic_info' }); 
+5
source share
1 answer

You must specify each field and edge that you want to receive, for example e. g.

 /me?fields=id,name,email 
+13
source

All Articles