Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I create a AdCreative duplicate? #120

Closed
Mirko09 opened this issue Aug 19, 2015 · 11 comments
Closed

Can I create a AdCreative duplicate? #120

Mirko09 opened this issue Aug 19, 2015 · 11 comments

Comments

@Mirko09
Copy link

Mirko09 commented Aug 19, 2015

I have AdCreative.

How do I create a duplicate using the SDK? Read existing AdCreative and create new AdCreative using old params - not a good idea. Is there a better option?

@pruno
Copy link
Contributor

pruno commented Aug 19, 2015

@Mirko09,

tl;dr; the API do not have a clone functionality

what's the end goal? creatives may be used for multiple ads. If you just need to replicate the same creatives under different AdSets for targeting reason, there is no need to duplicate the creative.

@Mirko09
Copy link
Author

Mirko09 commented Aug 19, 2015

@pruno
I want to set url_tags if it is empty. But API does not allow it. How can I do this?

@Mirko09
Copy link
Author

Mirko09 commented Aug 19, 2015

Ok. Duplicate is a bad idea in any case. How to update AdCreative.url_tags?

@pruno
Copy link
Contributor

pruno commented Aug 19, 2015

@Mirko09: the API allows it.

$creative = new AdCreative(<AD_CREATIVE_ID>);
$creative->read([AdCreativeFields::URL_TAGS]);
if ($creative->{AdCreativeFields::URL_TAGS} === null) {
  $creative->{AdCreativeFields::URL_TAGS} = 'key1=val1&key2=val2';
  $creative->save();
}

If you still encounter errors, can you please share the error?

@Mirko09
Copy link
Author

Mirko09 commented Aug 20, 2015

@pruno
Unfortunately, the API not allows it.
https://developers.facebook.com/docs/marketing-api/adcreative/v2.4#update

The only allowed update to an existing creative is to rename it.

How can I update AdCreativeFields::URL_TAGS? It is impossible? Can you add this feature, please?

@pruno
Copy link
Contributor

pruno commented Aug 21, 2015

@Mirko09, you'r right, unfortunately i think the only way is to download them, copy the data (augmenting with the url_tag), create new ones and re-map the adgroups

@pruno pruno closed this as completed Aug 21, 2015
@d3m3tr1s
Copy link

d3m3tr1s commented Mar 8, 2017

Sorry, this thread closed, but I would like to ask still, how to make sure you don't loose social credibility like
Shares #, Comments #, Likes # for an Ad when you clone AdCreative and re-map Ad to it?

@shane-landry
Copy link

any update on this? What d3m3tr1s asked

@dmitrywicked
Copy link

@ConcourseMedia yes we have figured out that call should be like

$fb->request('POST', "/<AD_ID>", ['creative' => json_encode($curCreative)]);

where $curCreative is an array of previously extracted creative with updated url_tag param

@bilaliqbal-te
Copy link

@dmitrywicked should we need to create new Ad Creative? If so, what about the old one?

@silvios
Copy link

silvios commented Dec 7, 2017

@bilaliqbal-te Good question. @dmitrywicked From what I can tell using the Facebook GUI, facebook deletes the old one, and attaches the new adcreative to the ad.

You can see this happen by editing an ad creative in the interface, then querying the ad id, via the API. you can see that only 1 ad creative is attached. And that one is the new one thats created from the edit.

I would love to know what you do though.

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

No branches or pull requests

7 participants