Connect to Facebook Graph API, get information from a list of Facebook videos to posts and build a FacebookPostsCollection-class
instance.
FacebookVideosCollection(id, token = NULL, parameters = list(),
fields = c("id", "from.fields(id,name)", "source", "length",
"content_category", "created_time"), 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
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.
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 id
. If no value
for a given field is found, it will be set to NULL
.
If id
is an iterable collection, then n
is the maximum number of videos to be pulled for each element of the source collection
in id
. It can be set to Inf
to pull out any available video and assumes the default value from the value
of facebook.maxitems
global option if missing. If id
is not a collection or cannot be iterated, the parameter is ignored.
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.
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.
A collection of videos in a FacebookVideosCollection-class
object.
Due to the network-graph nature of Facebook data model,
you can specify fields details for each field nesting .fields()
clauses.
For example, if you need only id
and source
for the cover
field, this is valid among others:
cover.fields(id,source)
.
Following the same philosophy, if you need only id
and name
for the from
node
you can use from.fields(id,name)
.
Instead of a character vector, one of these collections can also be passed as parameter in id
:
FacebookUsersCollection-class
will build a collection with
the videos that belong to the users in the source collection, assuming they have given the user_videos
or the user_posts
permission to the current application.
FacebookPagesCollection-class
will build a collection with
the videos uploaded by the pages in the source collection.
FacebookEventsCollection-class
will build a collection with
the videos took at the events in the source collection.
FacebookVideosCollection
is the constructor for the FacebookVideosCollection-class
.
It returns metadata about videos but doesn't return the raw image nor the various image formats available.
FacebookAlbumsCollection
, fbOAuth
Other Facebook Collection Constructors: FacebookAlbumsCollection
,
FacebookCommentsCollection
,
FacebookConversationsCollection
,
FacebookEventsCollection
,
FacebookGroupsCollection
,
FacebookLikesCollection
,
FacebookMessagesCollection
,
FacebookPagesCollection
,
FacebookPhotosCollection
,
FacebookPostsCollection
,
FacebookReactionsCollection
,
FacebookUsersCollection