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.

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.

The policy limit refers to the point above which you need a contract in place with Facebook - the limit which results in that error message is usually the 600 calls per 600 seconds per token limit, or the CPU usage limits (most likely to be hit if you're reading bulk feed data or insights) - the IP limit only applies in the absence of an access token with your app's calls
– IgyJan 8 '13 at 20:29

1

We are not doing more then 600 calls per token per 600 seconds, so @lgy I guess that you suggest that we hit the cpu limit. But why is batch fetching of photos hitting cpu limit? Isn't it a normal scenario to get photos in batch?
– Ronny ElkayamJan 10 '13 at 21:29

This rate limiting is applied globally at the app level. Ads api calls are excluded.

Rate limiting happens real time on sliding window for past one hour.

Stats is collected for number of calls and queries made, cpu time spent, memory used for each app.

There is a limit for each resource multiplied by monthly active users of a given app.

When the app uses more than its allowed resources the error is thrown.

Error, Code: 4, Message: Application request limit reached

The docs also give recommendations for avoiding the rate limits. For app level limits, they are:

Recommendations:

Verify the error code (4) to confirm the throttling type.

Do not make burst of calls, spread out the calls throughout the day.

Do smart fetching of data (important data, non duplicated data, etc).

Real-time insights, make sure API calls are structured in a way that you can read insights for as many as Page posts as possible, with minimum number of requests.

Don't fetch users feed twice (in the case that two App users have a specific friend in common)

Don't fetch all user's friends feed in a row if the number of friends is more than 250. Separate the fetches over different days. As an option, fetch first the app user's news feed (me/home) in order to detect which friends are more important to the App user. Then, fetch those friends feeds first.

Consider to limit/filter the requests by using the following parameters: "since", "until", "limit"

Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).