Viewing Shares information for a Facebook post usi

2019-08-04 19:08发布

问题:

Im trying to use the Facebook graph api on rails to find for a specific post who shared it. Looking through the documentation and the api data it doesn't seem that this information is available for a specific post. I am able to get the likes and comments information, however not the shares.

Would anyone know whether the current Facebook Api gives that information? Thanks

回答1:

Using Graph API, do a request to graph.facebook.com/POST_ID?fields=sharedposts. Iterate through the resulting array to get the sharers' identity.

Example in Python here.