Facebook图形搜索-无论通过多少限制,仅返回约500个结果 [英] Facebook graph search - only about 500 results returned regardless of limit passed

查看:44
本文介绍了Facebook图形搜索-无论通过多少限制,仅返回约500个结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

进行Facebook图形搜索查询时,可以选择指定 limit 参数.我知道硬限制为5000.但是,当我进行广泛查询时,即使 limit 远高于该数目,我总是会检索到约500个结果(介于480和540之间).

When doing Facebook graph search queries, you have the option of specifying the limit parameter. I am aware of the fact that the hard limit if 5000. However, when I do broad queries, I always retrieve about 500 results (between 480 and 540), even if the limit is well above that.

例如,

https://graph.facebook.com/search?q=doctor&locale=en_US&limit=1000&type=page&fields=id

尝试时返回了527个结果.提供有效的 access_token 不会返回更多结果.

Returned 527 results when I tried. Providing a valid access_token did not return more results.

有人对这是为什么有任何想法吗?可能如何克服?

Does anyone have any ideas as to why this is, and possibly how it can be overcome?

推荐答案

Facebook的API遵循足够好"的原则.它会一直获取结果,直到它认为花费的时间太长了,并随便回复发生的一切即可.如果您要求limit = 5000,您很可能总会获得更少的收入,但是减少多少取决于检索这些详细信息的复杂程度.

Facebook's API works on a "good enough" principle. It will keep fetching results until it considers that it's taking too long to respond and just reply with whatever it happens to have gotten. If you ask for limit=5000 you'll most likely always get less, but how much less depends on how complicated it is to retrieve those details.

解决该问题的唯一方法是对Graph API使用分页"方法.但是,我想每个请求都会导致一个新的搜索,您可能最终会得到重复的结果.

The only way around it is using the 'paging' methods to the Graph API. However, I imagine each request will result in a new search and you may end up getting repetitive results.

这篇关于Facebook图形搜索-无论通过多少限制,仅返回约500个结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆