Facebook graph search - only about 500 results returned regardless of limit passed

£可爱£侵袭症+ 提交于 2020-01-15 13:33:11

问题


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.

For example,

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

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?


回答1:


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.

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.



来源:https://stackoverflow.com/questions/7888441/facebook-graph-search-only-about-500-results-returned-regardless-of-limit-pass

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!