From me friends, know who is already using the app
- by Toni Michel Caubet
I got working to get all friends from 'me' user, like this:
FB.api('/me/friends?fields=id,name,updated_time&date_format=U&<?=$access_token?>',
{limit:3,
function(response){ console.log('Friend name: '+response.data[0].name);
}
);
But i need to get if the user is in the app already or not, how can I alter the query to get an extra row in the object 'is_in_app' true/false?
FB.api('/me/friends?fields=id,name,updated_time&date_format=U&<?=$access_token?>',
{limit:3,
function(response){
var text = 'is not in app';
if(response.data[0].is_in_app == true) text = 'is in app!!';
console.log('Friend name: '+response.data[0].name + ' ' + text);
}
);
How can i achieve this?