是否可以限制/过滤 FB 图表(页面)请求:
- 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")
是否可以对结果进行排序(例如按喜欢的数量降序排列?)
我以此为起点:
http://graph.facebook.com/search?q=california&type=page&fields=id,name,location,category
最佳答案
Facebook graph api 首先返回最新的对象。不幸的是,您无法订购返回的顺序。 API 确实通过自己的逻辑计算相对性来尽力而为。
- limit : 返回的对象数量
- offset:结果的起点
没有升序或降序之分。
您可以对某些对象使用 FQL,但这不适用于搜索。
要知道是否支持,只需在浏览器中输入 url 并查看底部分页部分。大多数支持的参数都在那里。
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"
}
关于Facebook Graph Api,限制和/或订单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13521483/