After that you managed to get the object of the response session, you can do the following
var rec="Name : "+response.name+"";
rec +="Link: "+response.link+"";
rec +="Username: "+response.username+"";
rec +="id: "+response.id+"";
rec +="Email: "+response.email+"";
function getPhoto()
{
FB.api('/me/picture?type=normal', function(response) {
var img=response.data.url;
});
For more information, you can refer to this guide:
https://developers.facebook.com/docs/javascript/reference/FB.api
source
share