I'm trying to figure out how to find how many of my friends like a particular entity.
For example, for a given book or movie, how can I look up how many of my friends have already liked the same book or movie.
I believe that information does appear when we display the fb:like button social plugin but I want to get that count so I can programatically display the most popular books among my friends etc is descending order.
My backend is php but I'm also using Javascript SDK. Thanks for your inputs in advance
These "objects" are actually pages, so to retrieve your friends list that like a movie or a book (a page), use this query:
Try this in the console of fql.query, it will retrieve all your friends ID that likes the Inception movie.
EDIT:
The obvious way to retrieve the movies (for example) that your friends like would be:
But I've noticed that it won't return all the users if the set is large (which most likely the case for every user)..so I've made a hack just to get you started!
This code is doing the following:
And the result would be something like:
From here, you can check for the most liked...etc
P.S.: As I said the above just to get you started and I guess you can cache some queries and improve the performance.