I got my token (after 4 months! - I think Anash helped get me across
the line, thx).
My app is published to the live system after a few tweaks - Hurray!

I have a question about whether you can use SET in AdGroupAdOperation
rather then ADD when updating the content of a textAd?
I made the changes outlined below, the code executes without error but
the ad did not change

I took my 'ADD' code which works fine (but costs 40 units & you have
to delete the old ad), changed the operator to 'SET' and added a id to
$textAd

#### Original 'ADD' code

// Create text ad.
$textAd = new TextAd();
$textAd->headline = 'My headline';
$textAd->description1 = 'description 1';
$textAd->description2 = 'description 2';
$textAd->displayUrl = 'www.example.com';
$textAd->url = 'http://www.example.com';

// Create ad group ad.
$textAdGroupAd = new AdGroupAd();
$textAdGroupAd->adGroupId = 123456789;
$textAdGroupAd->ad = $textAd;
$textAdGroupAd->status = 'ENABLED';

// Create operations.
$operation = new AdGroupAdOperation();
$operation->operand = $textAdGroupAd;
$operation->operator = 'ADD';

#### New  'SET' variant

// Create text ad.
$textAd = new TextAd();
$textAd->id = 987654321;
$textAd->headline = 'My headline';
$textAd->description1 = 'description 1';
$textAd->description2 = 'description 2';
$textAd->displayUrl = 'www.example.com';
$textAd->url = 'http://www.example.com';

// Create ad group ad.
$textAdGroupAd = new AdGroupAd();
$textAdGroupAd->adGroupId = 123456789;
$textAdGroupAd->ad = $textAd;
$textAdGroupAd->status = 'ENABLED';

// Create operations.
$operation = new AdGroupAdOperation();
$operation->operand = $textAdGroupAd;
$operation->operator = 'SET';

These 2 URLS only give the lightest information
http://code.google.com/apis/adwords/docs/reference/latest/AdGroupAdService.TextAd.html
http://code.google.com/apis/adwords/docs/reference/latest/AdGroupAdService.AdGroupAd.html
Is there anywhere with more complete docmentation?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to