getUserMostCommentingUsers: Get Users who Leave Most Comments on a User's Page

Description Usage Arguments Details Value Author(s) References Examples

Description

Returns a data.frame with IDs of users who commented posts on a user's page, and the number of times they left a comment. The data.frame is sorted by the number of comments: most commenting users first.

Usage

1
2
getUserMostCommentingUsers(user_id, access_token, num_posts = 'all', 
    num_users = 'all', verbose = FALSE)

Arguments

user_id

A numeric user ID. Available from the users's page (see Details).

access_token

Your access token (see ?makeAccessToken).

num_posts

Number of posts to consider.

num_users

Number of top users with most comments to report. Either 'all' (default) or numeric.

verbose

Boolean: print informational messages if TRUE (default).

Details

Many VK groups and users have their ID as part of their URL address (e.g. https://vk.com/publicGROUPID, where GROUPID is a sequence of numbers). In the event a group has a screen name that does not show its ID in the URL, one can access it by clicking on any group post (or photo, video, etc.): the post will open with a new URL of the form https://vk.com/SCREENNAME?w=wall-GROUPID_POSTID). Pass GROUPID (without the minus sign in front of it) to the function call.

The command returns negative IDs for VK groups and positive IDs for individual users.

Value

A data.frame with columns:

user_id

User ID who left comments.

num_comments

Number of comments a given users left on the retrieved number of posts.

Author(s)

Denis Stukal denis.stukal@nyu.edu

References

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

Examples

1
2
3
4
5
6
7
8
## Not run: 
mytoken = 'XXXXXXXXXXXXXX'
userid = AAAAAAAA
# Show 10 users with most comments on a user's page
dat <- getUserMostCommentingUsers(user_id = userid, access_token = mytoken, num_users = 10) 
str(dat)

## End(Not run)

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