Description Usage Arguments Details Author(s) See Also Examples
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.
1 | getShares(post, token, n = 100)
|
post |
A post ID |
token |
Either a temporary access token created at
https://developers.facebook.com/tools/explorer or the OAuth token
created with |
n |
numeric, maximum number of shares to return. |
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/
Pablo Barbera pablo.barbera@nyu.edu
1 2 3 4 5 6 7 8 9 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.