getShares function

Extract list of users who publicly shared a public Facebook post

Extract list of users who publicly shared a public Facebook post

getShares retrieves a list of posts that correspond to shares of a post on a public Facebook page. Only public posts by users who have granted authorization to the app used to authenticate.

getShares(post, token, n = 100)

Arguments

Details

getShares returns a data frame with four variables: from_name

(the name of the user who shared the post), from_id (the ID of the user who shared the post), shared_time (the time at which the post was shared), and id (the ID of the new post).

For more information on why not all shared posts are returned, see here: https://developers.facebook.com/bugs/1404733043148335/

Examples

## Not run: ## See examples for fbOAuth to know how token was created. ## Getting information about Facebook's Facebook Page load("fb_oauth") fb_page <- getPage(page="facebook", token=fb_oauth) ## Getting shares of most recent post shares <- getShares(post=fb_page$id[1], n=2000, token=fb_oauth) ## End(Not run)

Author(s)

Pablo Barbera pablo.barbera@nyu.edu

See Also

getPage, getPost