thanks for your answer

tried this already,
I've got many things working, like adding keywords, negatives etc.
I just don't get what I'm doing wrong in this particular case.



On Tuesday, December 2, 2014 11:55:09 PM UTC+1, Josh Radcliff (AdWords API 
Team) wrote:
>
> Hi,
>
> I'm not a PHP expert so I may be off base here, but it looks to me like 
> you are setting the *bids* attribute to a single bid, but that attribute 
> should be an array. Could you try modifying:
>
> $biddingStrategyConfiguration->bids = $bid;
>
> to:
>
> $biddingStrategyConfiguration->*bids[]* = $bid;
>
> and let me know if that resolves the issue? Also, you may want to check 
> out the AddKeywords.php example 
> <https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201409/BasicOperations/AddKeywords.php#L69>,
>  
> as that shows how to create a new keyword and set its bid. It's a slightly 
> different operation, but many of the same concepts will apply to your use 
> case.
>
> Thanks,
> Josh, AdWords API Team
>
> On Tuesday, December 2, 2014 11:27:34 AM UTC-5, Adrien VIELLIARD wrote:
>>
>> after several hours can't get this to work
>> and the error is not the most helpful.
>>
>> simply trying to update the bid for a keyword : 
>> using the php client library and api version 201409
>>
>>
>> $adGroupCriterionService = $user->GetService('AdGroupCriterionService', 
>> ADWORDS_VERSION);
>>   $operations = array();
>>     // Create keyword criterion.
>> $criterion = new Criterion();
>>         $criterion->id = $keywordId;
>>
>>         // Create ad group criterion.
>>         $adGroupCriterion = new BiddableAdGroupCriterion();
>>         $adGroupCriterion->adGroupId = $adgroupId;
>>         $adGroupCriterion->criterion = $criterion;
>>         
>>         $bid = new CpcBid(new Money(floatval($newcpc) * 
>> AdWordsConstants::MICROS_PER_DOLLAR));
>>     $biddingStrategyConfiguration = new BiddingStrategyConfiguration();
>> $biddingStrategyConfiguration->bids = $bid;
>> $adGroupCriterion->biddingStrategyConfiguration = 
>> $biddingStrategyConfiguration;
>>         
>>         // Create operation.
>>         $operation = new AdGroupCriterionOperation();
>>         $operation->operand = $adGroupCriterion;
>>         $operation->operator = 'SET';
>>
>>         $operations[] = array($operation);
>>                  $result = $adGroupCriterionService->mutate($operations);
>>
>>
>> anything I'm doing wrong here
>> I get a : Fault occurred while processing.
>>
>> thanks for your help
>> cheers
>> A.
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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
--- 
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 adwords-api+unsubscr...@googlegroups.com.
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/596b661f-9d78-4c54-a91e-b86dd6b2f413%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to