Connect to Facebook Graph API, get information from a list of inbox conversations and build a
1 2 3 4 5
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
anonymous function that is executed for each element of the collection, passed to the function as a list called 'x'. If the function returns
FacebookConversationsCollection is the constructor for the
It returns data about inbox conversations of users or pages but doesn't return lists of messages or users involved.
FacebookMessagesCollection-class can be built on top to pull out the messages of each conversation.
A collection of conversations 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
FacebookPagesCollection-class will build a collection with
all the inbox conversations to pages of the source collection. A page access token with
read_page_mailboxes is needed
to read the related mailboxes.
FacebookUsersCollection-class will build a collection with
all the conversations that person is involved with if they are a developer of the application making the request.
A user access token with
read_mailbox is needed to perform this action.
FacebookMixedCollection-class will build a collection with
all the conversations, filtering only to the
page in the source collection.
Gabriele Baldassarre https://gabrielebaldassarre.com
Other Facebook Collection Constructors:
1 2 3 4 5 6 7 8 9
## Not run: ## See examples for fbOAuth to know how token was created. load("fb_page_oauth") ## Getting the conversations of an example page. A page access token is needed to access the inbox conversations <- FacebookConversationsCollection(FacebookPagesCollection( "9thcirclegames", fb_page_oauth)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.