Learn R Programming

vkR (version 0.2)

vkOAuth: Client authorization

Description

Client authorization

Usage

vkOAuth(client_id, scope = "friends", email, password)

Arguments

client_id

Application ID

scope

Requested application access permissions (see below).

email

Email or phone number

password

Password

Details

List of Available Settings of Access Permissions:

  • friends Access to friends.

  • photos Access to photos.

  • audio Access to audios.

  • video Access to videos.

  • docs Access to documents.

  • notes Access to user notes.

  • pages Access to wiki pages.

  • status Access to user status.

  • wall Access to standard and advanced methods for the wall.

  • groups Access to user groups.

  • messages Access to advanced methods for messaging.

  • notifications Access to notifications about answers to the user.

Examples

Run this code
# NOT RUN {
# an example of an authenticated request
vkOAuth(client_id = 123456,
        scope = "friends,groups,messages",
        email = "your_email@example.com",
        password = "your_secret_password")

# save access token for future sessions
at <- getAccessToken()

# an example of request
me()

# an example of an authenticated request without specifying email and password
vkOAuth(client_id = 123456, scope = "friends,groups,messages")

# copy access token from browser address bar
setAccessToken("your_secret_access_token")
# }

Run the code above in your browser using DataLab