Connect to Facebook Graph API, get information from a list of Facebook events and build a
1 2 3 4 5
FacebookEventsCollection(id, token = NULL, parameters = list(), fields = c("id", "owner.fields(id,name)", "category", "description", "end_time", "attending_count", "declined_count", "maybe_count", "noreply_count", "interested_count"), n = getOption("facebook.maxitems"), metadata = FALSE, .progress = create_progress_bar())
A character vector or a comma-delimited string of IDs or an existing Facebook Collection of any of the supported types (see below).
Either a temporary access token created at
https://developers.facebook.com/tools/explorer or the OAuth token
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.
A character vector with the fields to get for each
If set to
progress_bar object as defined in the plyr package.
By default the
FacebookEventsCollection is the constructor for the
It returns metadata about events but doesn't return the list of attenders by default.
A collection of events in a
Due to the network-graph nature of Facebook data model,
you can specify fields details for each field nesting
For example, if you need only
source for the
cover field, this is valid among others:
Following the same philosophy, if you need only
name for the
you can use
Instead of a character vector, one of these collections can also be passed as parameter in
FacebookUsersCollection-class will build a collection with
the events of the users in the source collection. By default, only the attending events are returned, but
this behaviour can be changed using the
FacebookPagesCollection-class will build a collection with
the events linked to the pages in the source collection.
FacebookGroupsCollection-class will build a collection with
the events linked to the groups in the source collection.
Gabriele Baldassarre https://gabrielebaldassarre.com
Other Facebook Collection Constructors:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
## Not run: ## See examples for fbOAuth to know how token was created. load("fb_oauth") ## Getting information about two example Facebook Pages fb.pages <- FacebookPagesCollection(id = c("9thcirclegames", "NathanNeverSergioBonelliEditore"), token = fb_oauth) ## Pull at most 10 albums from each page fb.events <- FacebookEventscollection(id = fb.pages, token = fb_oauth, n = 10) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.