Facebook Graph API Receive All Posts From Post

I am very new to facebook graph api, in fact I just started today, so I could use some help.

My code works fine, I wrote a simple algorithm to list people who like a certain position, but the problem is this. Here is the JSON response I get from the api chart:

<br/> {<br/> "likes": {<br/> "data": [<br/> {<br/> "name": "NAME",<br/> "id": "ID"<br/> },<br/> {<br/> "name": "NAME",<br/> "id": "ID"<br/> },<br/> {<br/> "name": "NAME",<br/> "id": "ID"<br/> },<br/> {<br/> "name": "NAME",<br/> "id": "ID"<br/> }<br/> ],<br/> "count": 22<br/> },<br/> "id": "POST ID",<br/> "created_time": "DATE CREATED"<br/> }<br/> 

so even if there is COUNT: 22 Likes, the server returns only 4 names. Is it possible to get all the names? if so, how?

+7
source share
4 answers

You can run another request using the identifier of a similar object with a request for details (i.e. / Likes? Limit = 99)

+8
source
 https://graph.facebook.com/v2.4/[post_id]?fields=shares,likes.summary(true),comments.summary(true) 

Facebook (v2.4 API) counts the message (share + likes + comments)

added : note that the objects "albums" + "photos" do not have common resources, the response from the API will show you an error message that this object does not have such a property type.

+4
source

You can do it:

 https://graph.facebook.com/'.$post_id.'/comments?limit=0 // for comments https://graph.facebook.com/'.$post_id.'/likes?limit=0 // for likes 

Using facebook API. Hope this helps.

+2
source

Use FQL as follows:

SELECT user_id FROM like WHERE object_id=10151751324059927 LIMIT 1000

Now count the amount of use of Id-s. But it will give you like accounts only up to 1000 like it

+1
source

All Articles