getCommentReplies {Rfacebook} | R Documentation |
Extract replies to comments on page post
Description
getCommentReplies
retrieves the list of comments replying to
an individual comment on a post by a public Facebook page.
Usage
getCommentReplies(comment_id, token, n = 500, replies = TRUE,
likes = FALSE, n.likes = n, n.replies = n, api = NULL)
Arguments
comment_id |
A comment 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 replies and likes to return. |
replies |
logical, default is |
likes |
logical, default is |
n.likes |
numeric, maximum number of likes to return. Default is |
n.replies |
numeric, maximum number of replies to return. Default is
|
api |
API version. e.g. "v2.8". |
Details
getCommentReplies
returns a list with three components: comment
,
replies
, and likes
. First, comment
contains information
about the original comment: author, creation date, id, counts of likes and comments,
etc. Second, replies
is a data frame with information about the replies
to the comment (author, message, creation time, id). Finally, likes
is
data frame that contains names and Facebook IDs of all the users that liked the comment.
Author(s)
Yan Turgeon
See Also
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 information and likes/comments about most recent post
post <- getPost(post=fb_page$id[1], n=2000, token=fb_oauth)
## Downloading list of replies to first comment
replies <- getCommentReplies(comment_id=post$comments$id[1], token=fb_oauth)
## End(Not run)