I'm just getting started with a project and wondered if someone can let me know if it's possible to:
A) Get a list of all friends for an authorised Facebook account via the API
B) Get all of the likes for each friend using the API
I saw this code suggested on another question:
FB.api("/likes?ids=533856945,841978743")
FB.api("me/friends",{
fields:'id',
limit:10
},function(res){
var l=''
$.each(res.data,function(idx,val){
l=l+val.id+(idx<res.data.length-1?',':'')
})
FB.api("likes?ids="+l,function(res){
console.log(res);
})
})
But I'm struggling to understand the logic of this as it looks like you need to know the ids
to get the likes.
Also is there a limit to the number of likes returned? I read something about it only returning the last X
number of likes for each user.
Many thanks!