bganesh11
bganesh11

Reputation: 11

List of shares in FB graph api

I am trying to get a list of all users who share a given object on Facebook using the graph api.

There's been some useful info in this regard on stack exchange, here: Getting which users shared a post and here: List of people who shared on facebook

I experimented with the graph api's /{object-id}/sharedposts endpoint on the api. When I make the api call with a given object id which I have verified has been shared over 100 times (according to the /{page-id}/feed endopoint I am getting the object id from for said post), the api result invariably returns as such:

{
  "data": [
  ]
}

So I am getting an empty array...is this because my access token will not allow me to get this information? I am not friends with any of the users sharing the post nor have I 'liked' the page in which the post originates from.

Just wondering if this is an authentication issue or if there's a different problem that I am running into. I've tried it with a few object IDs so I would like to ascertain exactly why there is no data when I use the /{object-id}/sharedposts endpoint.

Thanks!

Upvotes: 1

Views: 2819

Answers (1)

Ameet Wadhwani
Ameet Wadhwani

Reputation: 560

There was a comment recently added to a response on the List of people who shared on Facebook post you referenced that solved this issue for me.

An access token with read_stream permissions is required, even if you have other permissions like read_insights. I was getting the same results as you until I added the read_stream permission.

However, you still may not get all or any of the shared posts. To see a share, it either has to be shared publicly or you must have permission to view that person's shared post.

Upvotes: 2

Related Questions