Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Possibility to create copies of entities? #126

Open
ArbenKqiku opened this issue Oct 11, 2020 · 2 comments
Open

Possibility to create copies of entities? #126

ArbenKqiku opened this issue Oct 11, 2020 · 2 comments

Comments

@ArbenKqiku
Copy link
Contributor

Hi,

Is it possible to copy campaigns, ad sets or ads by using your package?

I saw there is an endpoint in the Facebook API, here is an example for the ad set: https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/copies/#overview

Thanks.

Arben

@ArbenKqiku
Copy link
Contributor Author

ArbenKqiku commented Oct 11, 2020

I was actually able to do it with a post request to copy an ad set:

token = "xyzxyzxyzxyzxyzxyzxyzxyz"
ad_set_id = "4234242343242432"
campaign_id = "4234242343242432"
name = "TESTCOPY"

URL = str_c("https://graph.facebook.com/v8.0/", ad_set_id,"?name=", name,"&campaign_id=", campaign_id, "/copies&access_token=", token)

POST(URL)

@daroczig
Copy link
Owner

Sorry, I won't have time in the near future to add support for this, but would appreciate a PR based on the above POST example using the internal fbad_request approach https://github.com/daroczig/fbRads/blob/master/R/fb_init.R#L56

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants