vkGetGroupStatPostReach {rvkstat}R Documentation

Statistics of Posts on The Community Wall.

Description

Returns statistics for writing to the wall.

Usage

vkGetGroupStatPostReach(
    owner_id,
    post_ids,
    username     = getOption("rvkstat.username"),
    api_version  = getOption("rvkstat.api_version"),
    token_path   = vkTokenPath(),
    access_token = getOption("rvkstat.access_token")
)

Arguments

owner_id

community ID - the owner of the entry. Indicated with a minus sign.

post_ids

vector containing record identifiers, please note - statistics data are available only for the 300 latest (most recent) posts on the community wall.

username

Your vkontakte login.

api_version

Vkontakte API version.

token_path

Path to dir with credentials

access_token

API access tokens obtained using vkAuth or vkGetToken functions

Details

Statistics records are currently available only to communities with the number of participants from 5000 and above, as well as official communities.

Please note - statistics data are available only for the latest 300 (most recent) posts on the community wall. Common errors may occur during execution. Their description is on a separate page - https://vk.com/dev/errors.

Value

Date frame with the following values:

1. reach_viral

viral coverage (if recording was promoted with targeted advertising)

2. reach_ads

advertising reach (if the record was promoted using targeted advertising).

3. reach_subscribers

reach subscribers.

4. reach_total

total coverage.

5. links

follow the link.

6. to_group

transitions to the community.

7. join_group

entry into the community.

8. report

number of complaints about the record.

9. hide

number of entries hiding.

10. unsubscribe

number of unsubscribe members.

11. post_id

post id.

Author(s)

Alexey Seleznev

References

Documentation for API method stats.getPostReach: https://vk.com/dev/stats.getPostReach

Examples

## Not run: 
## auth
my_tok <- vkAuth(app_id = 1, 
                 app_secret = "H2Pk8htyFD8024mZaPHm")

## Get the list of community messages
my_vk_wall  <- vkGetUserWall(user_id = -111111,
                             access_token = my_tok$access_token) 
							 
## Get sub-stats for the latest 300 community entries						 
post_reach <- vkGetGroupStatPostReach(owner_id = -2222222,
                                      post_ids = my_vk_wall$id,
                                      access_token = my_tok$access_token)

## End(Not run)

[Package rvkstat version 3.2.0 Index]