4

I am trying to get information about a set of user posts (last 20 posts). For each post, I would like to simply get likes, comments and shares count.

So far I was able to get the like and comment count, but I had no luck in retrieving the share count.

This is the query I used:

https://graph.facebook.com/me?access_token=x&limit=20&fields=id,comments.limit(0).summary(true),likes.limit(0).summary(true)

I understand that there are ways to retrieve the share count using the object id, but I would like to refrain from making 20 different requests in order to obtain this field.

Is there any other way that I can make a single batch request to achieve this?

Manuel Reis
  • 574
  • 8
  • 29

1 Answers1

1

You can get share count through engagement field of the object, as mentioned here : https://stackoverflow.com/a/5700882/533399

For batching your requests, graph api already supports batch requests :

https://developers.facebook.com/docs/graph-api/making-multiple-requests

Community
  • 1
  • 1
DhruvPathak
  • 42,059
  • 16
  • 116
  • 175
  • I appreciate this, but your answer does not provide an explanation on how to link both actions. Also, the first link uses an URL as an example, while I may only have the ID of a private post, for instance. Is it possible to get the share count on that? – Manuel Reis Aug 07 '16 at 21:29