I am accessing the Facebook Graph JS API, in order to display some of the user’s favorite movies, music and so on. Now I want to access all the restaurants a user has liked. I didn’t find anything in the API-doc, that this is supported. So I think about parsing all the likes of a user like this:
FB.api('/me/' + 'likes' + '?access_token+' + accessToken,
function(response){
for(var k=0; k<response.data.length; k++){
// Do some stuff with the data
}
});
Is this the only solution or do you know something else?
How would you code this solution?
1 Answer