Facebook api: (#4) Application request limit reached

Ronny Elkayam picture Ronny Elkayam · Dec 30, 2012 · Viewed 315.4k times · Source

Since late November we are hitting the application limit on the Facebook API. We are fetching user's photos, and selected 25 friends photos → this is done when a user signatures in (we are building albums for the users).

The above action is limited, but it was not limited till end of November. We are using batch calls to get photos from albums - is there a better way to get this info without being limited?

BTW, according to Facebook we are doing 1M calls per day, but according to our count we are doing 180K calls per day.

Fetching only the user's photos without his friend's photos is not a solution for us.

Answer

Simon Boudrias picture Simon Boudrias · Jan 8, 2013

The Facebook API limit isn't really documented, but apparently it's something like: 600 calls per 600 seconds, per token & per IP. As the site is restricted, quoting the relevant part:

After some testing and discussion with the Facebook platform team, there is no official limit I'm aware of or can find in the documentation. However, I've found 600 calls per 600 seconds, per token & per IP to be about where they stop you. I've also seen some application based rate limiting but don't have any numbers.

As a general rule, one call per second should not get rate limited. On the surface this seems very restrictive but remember you can batch certain calls and use the subscription API to get changes.

As you can access the Graph API on the client side via the Javascript SDK; I think if you travel your request for photos from the client, you won't hit any application limit as it's the user (each one with unique id) who's fetching data, not your application server (unique ID).

This may mean a huge refactor if everything you do go through a server. But it seems like the best solution if you have so many request (as it'll give a breath to your server).

Else, you can try batch request, but I guess you're already going this way if you have big traffic.


If nothing of this works, according to the Facebook Platform Policy you should contact them.

If you exceed, or plan to exceed, any of the following thresholds please contact us as you may be subject to additional terms: (>5M MAU) or (>100M API calls per day) or (>50M impressions per day).