Character. Valid access token with sufficient privileges. Visit the
Facebook API Graph Explorer
to acquire one.
which
Character vector. This is the accounts, campaigns, adsets,
or ads IDs to be queried. Remember: if report_level = "account", you must
start the ID with act_.
start_date
Character. The first and last full day to report, in the
format "YYYY-MM-DD".
end_date
Character. The first and last full day to report, in the
format "YYYY-MM-DD".
fields
Character, json format. Leave NA for default fields.
api_version
Character. Facebook API version
process
Boolean. Process GET results to a more friendly format?
Value
data.frame with un-nested processed results if process=TRUE or
raw API results as list when process=FALSE.
# NOT RUN {token <- YOURTOKEN
which <- act_ADACCOUNT
# Query all ads for "which" with results in the last 10 daysads <- fb_accounts(YOURTOKEN, which, start_date = Sys.Date() - 10)
# }