Description Usage Arguments Details Value Author(s) References Examples
Returns a data.frame with information about comments to posts on a user page.
1 | getUserWallComments(user_id, num_posts = 'all', access_token, verbose = FALSE, offset = 0)
|
user_id |
A numeric user ID. Available from the user's page (see Details). |
num_posts |
Number of posts to consider. Either 'all' (default) or a positive integer. |
access_token |
Your access token (see ?makeAccessToken). |
verbose |
Boolean: if FALSE (default), informational messages are suppressed. |
offset |
Number of the output element to start scraping from. |
Many users have their ID as part of their URL address (e.g. https://vk.com/idUSERID, where USERID is a sequence of numbers). In the event users have screen names that do not show their ID in the URL, one can access them by clicking on the user's post (or photo, video, etc.): the post will open with a new URL of the form https://vk.com/SCREENNAME?w=wall-USERID_POSTID). Pass USERID (without the minus sign in front of it) to the function call.
Returns a data.frame with columns:
comment_id |
A numeric ID of the comment. |
commenter_id |
A numeric ID of the user who left the comment. |
date |
Date of the comment. |
text |
Text of the comment. |
likes_count |
Number of likes the comment received. |
reply_to_user |
The numeric ID of the user whom the comment replies to (if the comment is a reply), or NA |
reply_to_comment |
The numeric ID of the comment which the comment replies to (if the comment is a reply), or NA |
user_id_wall |
User ID on whose wall the comment was posted. |
to_post_id |
Post ID which the comment was left on. |
Denis Stukal denis.stukal@nyu.edu
VK API Methods: Wall (https://vk.com/dev/wall.getComments)
1 2 3 4 5 6 7 | ## Not run:
mytoken = 'XXXXXXXXXXXXXX'
userid = AAAAAAAA
dat <- getUserWallComments(user_id = userid, access_token = mytoken)
str(dat)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.