Bilal Husain
Bilal Husain

Reputation: 1760

How to figure out the boundaries on Graph API's limit parameter

According to https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0,

Some edges have an upper maximum on the limit value, for performance reasons. We will return the correct pagination links if that happens.

A recent response for https://graph.facebook.com/20531316728/feed?limit=500&access_token=CAACE... is

{
   "error": {
      "message": "(#100) The 'limit' parameter should not exceed 250",
      "type": "OAuthException",
      "code": 100
   }
}

However (as documented) some endpoints allow limit=500. The response has error code 100 and error type OAuthException but the message tells a different story. What is a good way to detect that the HTTP 400 Bad Request response is because of the limit parameter?

Upvotes: 1

Views: 805

Answers (1)

kekewong
kekewong

Reputation: 308

This issue has been raised to Facebook developer team. https://developers.facebook.com/bugs/763425230375017/

Upvotes: 1

Related Questions