Description Usage Arguments Details Author(s) See Also Examples
getPost retrieves information about a public Facebook post, including
list of comments and likes.
1 2 3 |
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 comments and likes to return. |
comments |
logical, default is |
likes |
logical, default is |
reactions |
logical, default is |
n.likes |
numeric, maximum number of likes to return. Default is |
n.comments |
numeric, maximum number of comments to return. Default is
|
n.reactions |
numeric, maximum number of reactions to return. Default is
|
api |
API version. e.g. "v2.8". |
getPost returns a list with up to four components: post,
likes, comments, and reactions.
post contains information about the post: author, creation date, id,
counts of likes, comments, and shares, etc.
likes is a data frame that contains names and Facebook IDs of all
the users that liked the post.
comments is a data frame with information about the comments to
the post (author, message, creation time, id). To download also the replies
to specific comments, see getCommentReplies. Note that the total
number of comments may be different from the number report in comments_count
if some comments have been deleted.
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 information and likes/comments about most recent post
post <- getPost(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.