Learn R Programming

facebook.S4 (version 1.1.0)

facebook.current.accounts: Get the pages the current user currently manages.

Description

facebook.current.accounts pulls the list of pages the current user actually manages and put into a FacebookPagesCollection-class instance.

Usage

facebook.current.accounts(token, parameters = list(),
  n = getOption("facebook.maxitems"))

Arguments

token

Either a temporary access token created at https://developers.facebook.com/tools/explorer or the OAuth token created with fbOAuth.

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.

n

An integer value with the maximum number of participants to be pulled for each conversation in id. It can be set to Inf to pull out any participant of a given conversation and assumes the default value to facebook.maxitems global option if missing.

Value

A collection of mixed accounts in a FacebookMixedCollection-class object with the id and the type for each element included.

Details

This function requires the use of a OAuth token with pages_show_list permission granted.

Only the id and the type is returned in a mixed collection. In normal circumstances, type is always equal to page.

See Also

fbOAuth

Examples

Run this code
# NOT RUN {
## See examples for fbOAuth to know how token was created.
 load("fb_oauth")
 
admin.pages <- facebook.current.accounts(fb_oauth)

extended.pages <- admin.pages %>% FacebookPagesCollection()

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab