getUserPostComments: Get Comments to a User's Post

Description Usage Arguments Details Value Author(s) References Examples

Description

Returns a data.frame with publicly available information on comments to a post.

Usage

1
getUserPostComments(user_id, post_id, access_token, offset = 0)

Arguments

user_id

A numeric ID of the user comments to whose post are requested. Available from the user's page (see Details).

post_id

A numeric ID of the post comments to which are requested.

access_token

Your access token (see ?makeAccessToken).

offset

Number of the output element to start scraping from.

Details

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.

Value

A data.frame with columns (can vary due to information availability):

id

Comment ID

from_id

Comment author's ID

date

Date when the comment was posted

text

Comment text

likes_count

Number of likes the comment got

reply_to_user

User ID whom this comment replies to (NA if not a reply)

reply_to_comment

Comment ID to which this comment replies to (NA if not a reply)

Author(s)

Denis Stukal denis.stukal@nyu.edu

References

VK API Methods: Wall (https://vk.com/dev/wall.getComments)

Examples

1
2
3
4
5
6
7
8
## Not run: 
mytoken = 'XXXXXXXXXXXXXX'
userid = AAAAAAAA
postid = BBBBBB
dat <- getUserPostComments(user_id = userid, post_id = postid, access_token = mytoken)
str(dat)

## End(Not run)

denisStukal/Rvk documentation built on June 3, 2019, 5:56 p.m.