fbacc: (optional) FB_Ad_account object, which defaults to the last returned object of fbad_init.
target: ad account id(s) (default), campaign id(s), adset id(s) or ad id(s)
job_type: synchronous or asynchronous request. If the prior fails with "please reduce the amount of data", it will fall back to async request. Async query is possible with only one target.
retries: number of times this query has been sent to Facebook previously and failed -- to be used internally for error handling
simplify: return a list of data.frame or list objects
...: named arguments passed to the API, like time range, fields, filtering etc.
Returns
list of data.frame or list objects depending on the simplify argument
Examples
## Not run:fb_insights(fbacc)## get default fields and filter for a few metricsl <- fb_insights(date_preset ='today', level ='ad')## merge pages into tabular datadata.table::rbindlist(l)## sometimes more advanced list selections are neededl <- fb_insights(date_preset ='today', level ='ad', fields ='unique_actions', simplify =FALSE)## filter for ACTIVE Adsl <- fb_insights(date_preset ='today', level ='ad', filtering ="[{'field':'adset.effective_status','operator':'IN','value':['ACTIVE']}]")## End(Not run)