Description Usage Arguments Value Author(s) Examples
View source: R/updateCampaign.R
Update a specific campaign
1 | updateCampaign(id, settings, token)
|
id |
ID of object to update. |
settings |
|
token |
A valid token as returned by |
Boolean, success TRUE
or FALSE
John Coene jcoenep@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
# run authentication with your app details
TK <- fbAuthenticate(app.id = "1234567890123456",
app.secret = "16xx79321xx0130x2x10a08x3e2x80xx")
# get 100 accounts users (me) has access to
accounts <- listAccounts("me", TK)
ids <- createLabels(accs$id[1], labels = "my label", token = TK)
# collapse ids
ids <- paste0("'", paste0(ids, collapse = "', '"), "'")
ad_ids <- grabCampaigns(accs$id[1], TK) # retrieve adsets
# create settings to update - ad label
my_settings <- list(adlabels = paste0("[{id:'", ids,"'}]"))
updateCampaign(ad_ids[1], my_settings, TK)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.