List of people who shared on facebook

38,728

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:

enter image description here

I figure it out this connection via metadata=1 parameter:

enter image description here

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.

Share:
38,728

Related videos on Youtube

Will
Author by

Will

Updated on October 29, 2020

Comments

  • Will
    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ć
      Dejan Marjanović over 12 years
      facebook.com/… how can you see it if no one shared it?
    • Will
      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ć
      Dejan Marjanović over 12 years
      I'll post answer in 5 minutes...
    • Will
      Will over 12 years
      Ive 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ć
      Dejan Marjanović over 12 years
      I'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
    Will over 12 years
    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.
  • Dejan Marjanović
    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
    Will almost 12 years
    I 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 years
    Update: You can do it via "graph.facebook.com/OBJECT_ID/sharedposts" connection.
  • billy
    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
    Pat about 10 years
    This I believe is the more appropriate answer given its using the API.
  • ruX
    ruX over 9 years
    Great! BTW you also need read_stream permission. I've stuck on that. Without it you will get only empty response.
  • Tanzaho
    Tanzaho about 8 years
    Hi @ruX, how did you manage to get the read_stream permission ? It seems almost impossible with their review standards.
  • Frondor
    Frondor over 7 years
    Works if you use the v2.3 API
  • Shiro
    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
    emir over 7 years
    It is not giving information about shares, I can retrieve shares count and all info about likes and comments, but not about shares