List of people who shared on facebook
Solution 1
Go to... http://www.facebook.com/ajax/shares/view/?target_fbid=10154612868272801&__a=1
10154612868272801
is Facebook story ID, __a
stands for asynchronous.
You will see large amount of text/JSON, 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)...
Unfortunately, you must be logged into Facebook to do first step, figure it out :)
Solution 2
You can do it via "graph.facebook.com/OBJECT_ID/sharedposts" connection:
I figure it out this connection via metadata=1 parameter:
Solution 3
Tye this link: https://graph.facebook.com/134765166623967/sharedposts (with a valid access_token)
The id in the link is the wallpost id (87236249496_134765166623967) minus the page id (87236249496) and minus the underscore.
You'll also need the read_stream permission
Solution 4
I think you can get the share_count from stream table by FQL query just like
SELECT type, source_id, share_count, permalink, description, post_id, actor_id, target_id, message , share_count FROM stream WHERE filter_key = 'others' and post_id = '87236249496_134765166623967'
you can test it https://developers.facebook.com/tools/explorer/
Note: you have to take the read_stream permissions as explained here
Solution 5
I know you're looking to get at shares through the post_id, but can you settle for finding shares by page_id instead of post_id?
If you can, then you can use the following FQL to get the data you're looking for.
SELECT via_id, created_time, owner_comment
FROM link
WHERE owner = me()
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.
Related videos on Youtube
Will
Updated on October 29, 2020Comments
-
Will over 3 years
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?
-
Dejan Marjanović over 12 yearsfacebook.com/… how can you see it if no one shared it?
-
Will over 12 years@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.
-
Dejan Marjanović over 12 yearsI'll post answer in 5 minutes...
-
Will over 12 yearsIve just read through every table in FQL -- I'm beginning to think there is no solution, so if you have one in 5 minutes I'll be quite pleasantly surprised.
-
Dejan Marjanović over 12 yearsI'll give you a hint, won't work 100%... you have to be logged in via PHP. Probably no API yet, since mobile version doesn't even have that option.
-
-
Will over 12 yearsI'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.
-
Dejan Marjanović over 12 years@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 :)
-
Will almost 12 yearsI ended up going this way ... and it feels dirty. May 2012 and still using it, it gets broken regularly by facebook changes. Blah ...
-
林果皞 almost 11 yearsUpdate: You can do it via "graph.facebook.com/OBJECT_ID/sharedposts" connection.
-
billy over 10 years@林果皞, it seems to work for me to, but can't see it in the docs... maybe you could post an answer to this question.
-
林果皞 over 10 years@billy Ok. I've post this answer.
-
Pat about 10 yearsThis I believe is the more appropriate answer given its using the API.
-
ruX over 9 yearsGreat! BTW you also need
read_stream
permission. I've stuck on that. Without it you will get only empty response. -
Tanzaho about 8 yearsHi @ruX, how did you manage to get the
read_stream
permission ? It seems almost impossible with their review standards. -
Frondor over 7 yearsWorks if you use the v2.3 API
-
Shiro over 7 years@Frondor v2.3 also empty, no result been displayed.It only return { "created_time": "2016-10-17T10:10:46+0000", "id": "123456471212" }
-
emir over 7 yearsIt is not giving information about shares, I can retrieve shares count and all info about likes and comments, but not about shares