Reputation: 5975
Is it possible to limit/filter FB Graph (page) requests to :
- The category (of the page)? (for instance &category=restaurant)
- The number of likes it has (minimum threshold)
- Whether it has certain properties (for instance it must have a location.city or maybe filter where location.city == "San Jose")
and is it possible to order results (for instance by number of likes descending?)
I'm using this as a starting point:
http://graph.facebook.com/search?q=california&type=page&fields=id,name,location,category
Upvotes: 8
Views: 10338
Reputation: 27738
Facebook graph api returns the latest object first. and unfortunately, you cannot order the sequence of the return. API does do their best, by calculating relativity through their own logic.
There is no order by ascending or descending.
You can use FQL for some objects, but that does not applies to search.
To know if it is supported not, simply enter the url to the browser and look at the bottom paging section. Most of supported parameters are there.
http://graph.facebook.com/search?fields=id,name,location,category&q=california&limit=2&type=page
"paging": {
"next": "http://graph.facebook.com/search?fields=id,name,location,category&q=california&limit=2&type=page&offset=2&__after_id=108131585873862"
}
Upvotes: 5
Reputation: 341
I'm not sure on the order functionality but here you can add a limit parameter like this one:
http://graph.facebook.com/search?q=california&type=page&fields=id,name,location,category&limit=2
Upvotes: 3