Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook graph API 'ids' variable limit

I'm making API calls to retrieve simple data from Facebook pages:

/[page_id]?fields=likes,talking_about_count,checkins

I know I can get multiple results by providing multiple ids using the 'ids' variable:

/?ids=[page_id],[page_id],[page_id]&fields=likes,talking_about_count,checkins

My problem is that I don't how many ids I can retrieve simultaneously. I know the limit for batched request is 50, but I can't find the documentation for the 'ids' variable.


UPDATE: it seems like this limit has been removed on version 2.0 of the graph API, but I am still looking for an official answer.

like image 502
NiloVelez Avatar asked Jul 15 '14 11:07

NiloVelez


People also ask

Is Facebook Graph API deprecated?

Graph API Version Deprecations: November 2, 2021: Graph API v4. 0 will be deprecated and removed from the platform. February 3, 2022: Graph API v5. 0 will be deprecated and removed from the platform.

What 3 terms does Facebook use to describe what the graph API is composed of?

The Graph API is named after the idea of a "social graph" — a representation of the information on Facebook. It's composed of nodes, edges, and fields.

Is Facebook Graph API RESTful?

The Legacy REST API is in the process of being deprecated, while the Graph API is the most current, so if you're unsure of which one to use, your best bet is to go with that one. As you suggested, the Graph API, just like the Legacy REST API, is in fact a RESTful API.


1 Answers

I used Graph Explorer to list all post ids on a page. It returned me 140 posts. I then sent those 140 posts to the Graph API using the ids parameter and got this in return:

{
  "error": {
    "message": "(#100) Too many IDs. Maximum: 50. Provided: 140.", 
    "type": "OAuthException", 
    "code": 100
  }
}

So the answer is currently 50.

Facebook Graph API Limit Documentation

like image 89
Mark Evaul Avatar answered Oct 20 '22 23:10

Mark Evaul