Description Usage Arguments Details Value Nesting fields Valid sources Author(s) See Also Examples
Connect to Facebook Graph API, get information from a list of Facebook photos to posts and build a FacebookPhotosCollection-class
instance.
1 2 3 4 5 |
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 |
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 |
n |
If |
metadata |
If set to |
.progress |
progress_bar object as defined in the plyr package.
By default the |
stop.condition |
anonymous function that is executed for each element of the collection, passed to the function as a list called 'x'. If the function returns
|
FacebookPhotosCollection is the constructor for the FacebookPhotosCollection-class.
It returns metadata about photos but doesn't return the raw image nor the various image formats available.
A collection of photos in a FacebookPhotosCollection-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:
FacebookAlbumsCollection-class will build a collection with
the photos that belong to the albums in the source collection.
FacebookEventsCollection-class will build a collection with
the photos shot at the events in the source collection.
FacebookUsersCollection-class will build a collection with
the photos that belong to the users in the source collection, assuming they have given the user_photos
permission to the current application.
FacebookPagesCollection-class will build a collection with
the photos uploaded by the pages in the source collection. By default, the picture profile is returned, unless
you specify the type=uploaded or the type=tagged parameters.
Gabriele Baldassarre https://gabrielebaldassarre.com
FacebookAlbumsCollection, fbOAuth
Other Facebook Collection Constructors: FacebookAlbumsCollection,
FacebookCommentsCollection,
FacebookConversationsCollection,
FacebookEventsCollection,
FacebookGroupsCollection,
FacebookLikesCollection,
FacebookMessagesCollection,
FacebookPagesCollection,
FacebookPostsCollection,
FacebookReactionsCollection,
FacebookUsersCollection,
FacebookVideosCollection
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## 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.albums <- FacebookAlbumscollection(id = fb.pages, token = fb_oauth, n = 10)
## Pull all the available photos from each album
fb.photos.inf <- FacebookPhotoscollection(id = fb.albums, n = Inf)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.