1

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!

Community
  • 1
  • 1
bganesh11
  • 11
  • 1
  • 3
  • it is surely not possible to get a list, that would be a privacy issue. – andyrandy Aug 27 '14 at 17:00
  • 1
    not to get too philosophical, but isn't allowing us to get comments and likes out of the api also an equal privacy issue? I will just assume that it is because of authentication that I am getting the empty array then. Thanks! – bganesh11 Aug 27 '14 at 23:33
  • you are right, i missed that it was about a page. in that case it should be possible imho. only user profiles are secured, pages are public anyway. – andyrandy Aug 27 '14 at 23:42

1 Answers1

2

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.

Community
  • 1
  • 1
Ameet Wadhwani
  • 550
  • 4
  • 8