I've been scouring the docs for a while now and can't seem to find a way to accomplish this. The information is available publicly (on a facebook page ... the link says "View all # shares") but I can't seem to find a way to access this info either via FQL or the graph API.

I know I can get a list of likes for a given post:

https://graph.facebook.com/87236249496_134765166623967/likes

The goal is to get a list of people who've shared -- but there doesn't seem to be the same sort of thing for shares. Am I missing something?

@webarto I was not refering to that particular post -- i was showing an example of how you can easily get a list of people who liked a post. I imagine there's a way to get similar share information, but after 90 minutes of searching I came here.
–
WillOct 13 '11 at 0:24

5 Answers
5

You will see large amount of "text", it is basically HTML & JS for little popup window. There is portion of "text" like hovercard.php?id=# where # is Facebook user ID, using preg_match_all you then get all of the user ID's who shared that post.

Eg: 100000541151971 (Eric) and 9204448 (Courtney)...

Unfortunatelly, you must be logged into Facebook to do first step, figure it out :)

I've been meandering down that road on my own at this point -- but I'm having a difficult time believing that public information isn't available via the API in some way. Relying on this method is just asking to have it broken on a regular basis =\ but may be the only option. +1 Being "logged into facebook" via curl will be a pain in the arse, but doable.
–
WillOct 13 '11 at 0:55

@Will, I know, there are lots of "wanted" API calls that doesn't exist even it has been requested numerous times, like I've said, this isn't implemented on mobile version, maybe after that they will make API method. Until then, happy hacking :)
–
Dejan MarjanovicOct 13 '11 at 1:02

I ended up going this way ... and it feels dirty. May 2012 and still using it, it gets broken regularly by facebook changes. Blah ...
–
WillMay 15 '12 at 15:42

You can then compare via_id against the posts author (page ID) to determine if this share came from the post author in question.

Unfortunately, there seems to be a bug with the data return where some of the via_ids come back as 0. There is a ticket in with Facebook which, at the time of this post, has been open for three weeks at medium priority. I have no idea if this issue is specific to my app or affects everyone, but that query might get you what you want.