FacebookGenericCollection: Build a generic Collection of Facebook data

Description Usage Arguments Value Author(s) See Also

View source: R/FacebookGenericCollection.R

Description

Connect to Facebook Graph API, get information from a list of public Facebook items and build a FacebookGenericCollection-class instance.

Usage

1
2
3
FacebookGenericCollection(id, token, parameters = list(),
  fields = character(0), .progress = create_progress_bar(),
  metadata = FALSE)

Arguments

id

A character vector or a comma-delimited string of IDs or an existing Facebook Collection of any of the supported types (see below).

token

Either a temporary access token created at https://developers.facebook.com/tools/explorer or the OAuth token created with fbOAuth. If token NULL and id is a collection, use the token of the source collection. Otherwise, no query is performed to the Facebook Graph API and an empty collection is returned.

parameters

A list of parameters to be added to the Facebook Graph API query. For more information on the accepted parameters, see: https://developers.facebook.com/docs/graph-api/using-graph-api.

fields

A character vector with the fields to get for each id. If no value for a given field is found, it will be set to NULL.

.progress

progress_bar object as defined in the plyr package. By default the none progress bar is used, which prints nothing to the console. See create_progress_bar for details.

metadata

If set to TRUE, the metadata for each ID is pulled with the data and the type slot is fed accordingly. Please note that setting this to TRUE could considerably slow down the execution time, as more queries are needed.

Value

A collection of elements in a FacebookGenericCollection-class object or one of its subclasses.

Author(s)

Gabriele Baldassarre https://gabrielebaldassarre.com

See Also

FacebookPostsCollection, FacebookCommentsCollection, fbOAuth


facebook.S4 documentation built on May 2, 2019, 4 a.m.