Hi,
Regarding the version error, please make sure you are passing the proper
version when retrieving the service, e.g.,
$feedService = $user->GetService('FeedService', ADWORDS_VERSION);
For more details on working with sitelinks, please read the Sitelinks guide
<https://developers.google.com/adwords/api/docs/guides/feed-services>. At
the end of that guide are links to examples in each client library.
Thanks,
Josh, AdWords API Team
On Wednesday, February 11, 2015 at 12:10:54 PM UTC-5, abc def wrote:
>
> Thanks for your reply!
>
> I tried your hints, but now there is a new error:
>
> RequestError.INVALID_INPUT @ ; trigger:'You are accessing an AdWords API
> version v201402 that has been discontinued. Calls to this version may fail.
> Please visit the AdWords API blog for information on migration to the new
> AdWords API version.'
>
>
> But I am sure, that I use v201406. This is defined in the init.php:
>
> define('ADWORDS_VERSION', 'v201406');
>
>
> Where is my Problem?
>
> Is there a tutorial which shows how to add and modify sitelinks via the
> API?
>
>
> Am Donnerstag, 29. Januar 2015 21:26:48 UTC+1 schrieb Josh Radcliff
> (AdWords API Team):
>>
>> Hi Christian,
>>
>> To modify which feed items are used for sitelinks for a given campaign,
>> you would submit a CampaignFeedService.mutate
>> <https://developers.google.com/adwords/api/docs/reference/v201409/CampaignFeedService#mutate>
>> request
>> with a *CampaignFeedOperation* with:
>>
>> - operator
>>
>> <https://developers.google.com/adwords/api/docs/reference/v201409/CampaignFeedService.CampaignFeedOperation#operator>
>> =
>> *SET*
>> - operand
>>
>> <https://developers.google.com/adwords/api/docs/reference/v201409/CampaignFeedService.CampaignFeedOperation#operand>
>> =
>> a CampaignFeed
>>
>> <https://developers.google.com/adwords/api/docs/reference/v201409/CampaignFeedService.CampaignFeed>
>> with:
>> - *feedId* set to your feed ID
>> - *campaignId* set to your campaign ID
>> - *placeholderTypes* set to an array containing *1*
>> - *matchingFunction* modified with the new set of ConstantOperands
>>
>> <https://developers.google.com/adwords/api/docs/reference/v201409/CampaignFeedService.ConstantOperand>
>> pointing
>> to the new set of feed item IDs
>>
>> I'm guessing from the error you're receiving that you are trying to
>> perform an *ADD* operation, but that's failing because you can only have
>> one *CampaignFeed* for a given combination of *feedId, campaignId, *and*
>> placeholderType*.
>>
>> Cheers,
>> Josh, AdWords API Team
>>
>> On Thursday, January 29, 2015 at 5:52:56 AM UTC-5, abc def wrote:
>>>
>>> Hi,
>>>
>>> I am using the adwords api v201406 (I know there is a newer version) to
>>> generate campaigns, adgroups and so on.
>>> For these campaigns I will add sitelinks. To ADD the sitelinks it works
>>> fine.
>>> But sometimes I would like delete sitelinks and add new sitelinks in
>>> these campaigns. And this is my problem.
>>>
>>> For my coding I use the examples from the PHP Library
>>> /AdvancedOperations/UpdateSitelinks.php and AddSitelinks.php.
>>> So first I create a SitelinksFeed and then SitelinksFeedItems (my
>>> sitelinks for the campaigns) in the feed.
>>> Then I create a SitelinksFeedMapping and put it with the
>>> SitelinksCampaignFeed into my campaign. This works.
>>>
>>> But what I have to do to delete and add sitelinks in the same
>>> SitelinksCampaignFeed?
>>> By generating the feed I store the feeds id getting from the api, and
>>> when putting a new sitelink in the feed, I use these id.
>>> But I always get the errors
>>>
>>> CampaignFeedError.FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE @
>>> operations[0].operand.placeholderTypes;
>>>
>>> CampaignFeedError.CANNOT_ADD_ALREADY_EXISTING_CAMPAIGN_FEED @
>>> operations[0].operand;
>>>
>>>
>>> I think I had to use the feed, but there is the message that the feed
>>> exists.
>>> And how to delete the campaign feed and add a new?
>>>
>>> Is there any tutorial which helps me to add sitelinks in an existing
>>> SitelinksCampaignFeed?
>>> Thank you. I hope you will understand my Problem.
>>>
>>>
>>> Greetings from Germany,
>>> Christian
>>>
>>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/c41afbd4-e6bb-4a85-93f5-d45c039910ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.