Reputation: 63
I was using Facebook's graph api, asking for '/me', and it only returns the name and Id of the user. I know that it logs in properly, because it returns the correct name.
Here is a snippet of the javascript code I was using:
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' });
Upvotes: 5
Views: 2583
Reputation: 31479
You have to specify each field and edge you want to get returned, e. g.
/me?fields=id,name,email
Upvotes: 13