getReactions {Rfacebook}R Documentation

Extract total count of reactions to one or more Facebook posts

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

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

## 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)


[Package Rfacebook version 0.6.15 Index]