I know you can append limit and offset values to the graph.facebook.com/id/photos API call to paginate through photos. But large limits don’t seem to work well, photos end up missing. I read here that limit=0 gives you all photos, but again photos will be missing. So what’s the biggest limit you can use reliably? What’s the proper way to efficiently retrieve ALL photos?
Is there documentation on the limits of limit?
Here’s my experience with the Facebook API…
If you set a limit, you won’t get any more than that. However, a large limit will most certainly give you less than you requested despite more existing. All of Facebook seems to run on a principle of “good enough” when it comes to responding to API queries. If you ask for 5000 items and after 5-15 seconds the system is only able to retrieve 350, then that’s likely all you’ll retrieve. There also seems to be a limit on size of content. So, the limit completely relies on the type of content you’re querying and it’s not a fixed amount. It’s possible to say
limit=5and only get 4 items (even when more exist).limit=0used to give as many responses as possible, but I’m not sure if it still works. You can also usesince/untilto be more specific about the items you want to retrieve. But regardless, there’s no way to know if you’ve gotten all possible responses.