Description Usage Arguments Details Value Author(s) References Examples
Returns a data.frame with publicly available information about a user.
1 | getUserInfo(user_id, access_token)
|
user_id |
A numeric user ID. Available from the user's page (see Details). |
access_token |
Your access token (see ?makeAccessToken). |
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.
Universities, schools, and jobs are returned as data.frames.
A data.frame with columns (can vary due to information availability):
id |
User ID |
first_name |
User's first name |
last_name |
User's last name |
sex |
User's sex (available options: female, male) |
screen_name |
User's screen name |
bdate |
User's birth date |
city |
City code the user specified in the "Contacts" section |
country |
Country code the user specified in the "Contacts" section |
relation |
User's relationship status (1 - single; 2 - in a relationship; 3 - engaged; 4 - married; 5 - it's complicated; 6 - actively searching; 7 - in love; 8 - in a civil union; 0 - not specified.) |
... |
Other fields if available |
Denis Stukal denis.stukal@nyu.edu
VK API Methods: Users (https://vk.com/dev/users.get)
1 2 3 4 5 6 7 | ## Not run:
mytoken = 'XXXXXXXXXXXXXX'
userid = AAAAAAAA
dat <- getUserInfo(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.