getUserWall: Get Posts from a User Wall

Description Usage Arguments Details Value Author(s) References Examples

Description

Returns a data.frame with publicly available information about posts from a user wall

Usage

1
getUserWall(user_id, access_token, num_posts = 'all', verbose = FALSE)

Arguments

user_id

Numeric user ID. Available from user page (see Details).

access_token

Your access token (see ?makeAccessToken).

num_posts

Number of posts to consider. Either 'all' (default) or a positive integer.

verbose

Boolean: suppress informational messages if FALSE (default).

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.

There are 2 ways to specify the number of posts to retrieve. The user can either pass that number to the function call through the n argument, over (default) interactively type that number when prompted after the function reports the total number of available posts.

Value

A data.frame with columns:

id

Post ID

date

Date when a post was made

date_POSIXct

Number of seconds since January 1, 1970 to the moment when a post was made

text

Post text

comments_count

Number of comments to a post

likes_count

Number of likes of a post

reposts_count

Number of reposts of a post

reposted

Flag for a repost (1 if a post is a repost)

attachment

Flag for attachments in a post

Additional columns with information about reposts and attachments. See References for details.

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
## Not run: 
mytoken = 'XXXXXXXXXXXXXX'
userid = AAAAAAAA
dat <- getUserWall(user_id = userid, access_token = mytoken)
str(dat)

## End(Not run)

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