fbad_read_ad: Read ad details

Description Usage Arguments Value Note References Examples

View source: R/fb_ad.R

Description

Read ad details

Usage

1
fbad_read_ad(fbacc, id, fields = "id", simplify = TRUE)

Arguments

fbacc

(optional) FB_Ad_account object, which defaults to the last returned object of fbad_init.

id

ad id(s)

fields

character vector of fields to get from the API, defaults to id. Please refer to the Facebook documentation for a list of possible values.

simplify

return data.frame or list

Value

data.frame

Note

Will do a batched request to the Facebook API if multiple ids are provided.

References

https://developers.facebook.com/docs/marketing-api/reference/adgroup#Reading

Examples

1
2
3
4
5
6
7
## Not run: 
## get and Ad ID from yesterday
adid <- fb_insights(date_preset = 'yesterday', level = 'ad')[[1]]$ad_id[1]
## look for current status of the Ad
fbad_read_ad(id = adid, fields = c('effective_status'))

## End(Not run)

daroczig/fbRads-transition documentation built on May 20, 2019, 4:08 p.m.