I am using JavaScript to retrieve friends’s info as follows:
FB.api('/me/friends', {fields:'name,id,hometown,education'}, function(response){
var l=''
$.each(response.data,function(idx,val){
l=l+val.id+(idx<response.data.length-1?',':'')
});
FB.api("likes?ids="+l,function(res){
allLikes = res;
});
}
Using the above code, I have successfully retrieved all likes of all of the user’s friends. I wanted to check which of the user’s friends have liked a particular page. The response data is about 1.5MBs. I have to iterate through individual likes of all of the friends one-by-one to figure this out. How to retrieve info only those friends who have already liked a particular page?
You can get all the user ids of the user’s friend who have liked a particular
<page_id>using following FQL query.