I receive Graph API error #613 (message: "Calls to mailbox_fql have exceeded the rate of 300 calls per 600 seconds
", type:OAuthException
) when testing my app. It's a desktop app, and the only copy is the one running on my machine (so there's only one access_token
and one user - me).
I query the inbox
endpoint once every 15 seconds or so. Combined, the app makes about 12 API calls (to various endpoints) per minute. It consistently fails on whichever call fetches the 300th thread (there are about 25 threads on the first page of the inbox
endpoint, and I'm only fetching the first page). I am not batching any calls to the Graph API.
I'm developing on Mac OS X 10.7 using Objective-C. I use NSURLConnection
to call the Graph API asynchronously. As far as I know, each request processed by NSURLConnection
should only result in one request to Facebook's API.
Going on the above, I'm having trouble figuring out why I am receiving this error. I suspect that it is because a single call to the inbox
endpoint (i.e. a call to the URI https://graph.facebook.com/me/inbox?access_token=...
) is counted as more than one call to mailbox_fql
. In particular, I think that a single call that returns <n> threads counts as <n> calls against mailbox_fql
. If this is the case, is there a way to reduce the number of calls to mailbox_fql
per API call (e.g. by fetching only the <n> most recent threads in the inbox, rather than the whole first page)?
The documentation appears to be pretty sparse on this topic, so I've had to get by mostly through trial and error. I'd be thrilled if anyone else knows how to tackle this issue.