问题
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