# 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 albums from each page
fb.albums.inf <- FacebookAlbumscollection(id = fb.pages, token = fb_oauth, n = Inf)
## Convert the collection to a data frame
fb.albums.df <- as.data.frame(fb.albums)
# The same as before in a more compact fashion using the pipe operator
# chaining from a Pages Collection
fb.albums.pipe <- FacebookPagesCollection(id = c("9thcirclegames",
"NathanNeverSergioBonelliEditore"),
token = fb_oauth) %>% FacebookAlbumsCollection(n = 10)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab