getReactions: Extract total count of reactions to one or more Facebook...

Description Usage Arguments Details Author(s) See Also Examples

View source: R/getReactions.R

Description

getReactions retrieves information from a single or multiple posts, returning the total count of reactions of each type (like, love, haha, wow, sad, angry).

Usage

1
getReactions(post, token, verbose = TRUE, api = NULL)

Arguments

post

A post ID, or a vector of post IDs

token

Either a temporary access token created at https://developers.facebook.com/tools/explorer or the OAuth token created with fbOAuth.

verbose

logical, default is TRUE, which will print additional information on the console.

api

API version. e.g. "v2.8". NULL is the default.

Details

The solution implemented here is based on this Stack Overflow response: http://stackoverflow.com/questions/36930414/how-can-i-get-facebook-graph-api-reaction-summary-count-separately

Author(s)

Pablo Barbera pablo.barbera@nyu.edu

See Also

getPage, getPost

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
## See examples for fbOAuth to know how token was created.
## Getting information about Facebook's Facebook Page
load("fb_oauth")
fb_page <- getPage(page="facebook", token=fb_oauth)
## Getting reactions for most recent post
post <- getReactions(post=fb_page$id[1], token=fb_oauth)

## End(Not run)

Rfacebook documentation built on May 25, 2017, 9:02 a.m.

Search within the Rfacebook package
Search all R packages, documentation and source code