I am looking for a way to query facebook pages that for example, have something to do with food.
Not to difficult 😉
$pages = $facebook->api('search?q=food&type=page');
But… I want to get the largest pages (most likes) of that category. Search get’s close, but I can’t influence the return order (I think).
I have been looking here: https://developers.facebook.com/docs/reference/fql/page/
to see if I can get it to work with a query, but it seems I can only query information about a specific page.
I have been looking for several solutions without succes. Is this even possible at all? Any help would be much appreciated!
How about this:
Make that request to “search?q=food&type=page“, then take the results and iterate over them.
For each result make the following FQL query:
For example, the first result I get has the id “25255939006”, the FQL will be:
And the result is:
Hope this is what you were after.