5

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' });
nikitawootten
  • 63
  • 1
  • 3

1 Answers1

13

You have to specify each field and edge you want to get returned, e. g.

/me?fields=id,name,email
Tobi
  • 31,405
  • 8
  • 58
  • 90