Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/grabCreatives.R
Fetches URL(s) name(s) and more about creatives used in an ad.
| 1 2 | grabCreatives(id, token, n = 100, fields = "default", verbose = FALSE,
  limit = 100)
 | 
| id | The id of the object you want to grab from (Required), see how to find yours. | 
| token | A valid token as returned by  | 
| n | Number of results to retrieve, defaults to  | 
| fields | Defaults to  | 
| verbose | Defaults to  | 
| limit | Number of results requested at each API call, defaults to 
 | 
Calls adcreatives.
Returns IDs and URLs of all images contained in object (single row if ad.id is passed as arguement)
John Coene jcoenep@gmail.com
fbAuthenticate, listAccounts,
grabAds
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run: 
# authenticate
fbOAuth <- fbAuthenticate(app.id = "1234567890123456", 
                          app.secret = "16xx79321xx0130x2x10a08x3e2x30xx", 
                          scope = "ads_management")
# get account ids
act <- listAccounts(id = "me", token = fbOAuth)
# get all creatives in ad account
img_acc <- listCreatives(id = act[2,2], token = fbOAuth)
# get campaigns, adsets and ads IDs from account
ads <- grabAds(account.id = act[2,2], token = token = fbOAuth)
# get ad creatives
crea_ad <- listCreatives(id = sample(ads$id, 1), token = fbOAuth)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.