# NOT RUN {
## See examples for fbOAuth to know how token was created.
load("fb_oauth")
## Getting information about 9th Circle Games' Facebook Page
fb.pages <- FacebookPagesCollection(id = c("9thcirclegames",
"NathanNeverSergioBonelliEditore"),
token = fb_oauth)
## Getting informations from the same pages, but with a different set of fields
fb.pages.covers <- FacebookPagesCollection(id = fb.pages,
fields = c("id",
"name",
"cover.fields(id,source,height,width)")
)
## Convert the collection to a data frame
fb.pages.df <- as.data.frame(fb.pages)
## Build a collection of the pages the current user likes
likes.pages <- FacebookUsersCollection("me", fb_token, fields = "") %>%
facebook.object.likes() %>%
FacebookPagesCollection()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab