简体   繁体   中英

Get all names of people who shared a post on Facebook

I want to get basic information (names, ids) about users who shared a post. Now I have:

import facepy

long_access_token = "Access-token"

graph = facepy.GraphAPI(long_access_token)
g = graph.get('10153256675935268/sharedposts')

print len(g['data']) # outputs 10

for share in g['data']:
    print share['from']['name']

The problem, and I don't understand why, is that it gives information only about 10 people (when there are 276 shares for the post ).

I tried to increase limit up to 200 ('10153256675935268/sharedposts?limit=200') it increased number of shares up to 45, but never it went to 276.

How I can get information about all people who shared a post?

That's because some people didn't share this post publicly . If you don't befriend these sharers, you won't be able to get any information about their posts.


You can see that it is the same on facebook.com/10153256675935268 . By clicking "shares", just around 45 shares are displayed. By the way, it is said below the shared posts list:

Some posts may not appear here because of their privacy settings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM