Hi-

I'm sure I'm missing something obvious but I've been going around in 
circles on this one for awhile.  What I am trying to do is update the max 
cpc bid on a keyword.  My code use to work in previous version of adwords, 
but the newest library the syntax has changed and I can't seem to figure it 
out.  In the code examples from Google, there is one for perl (
https://code.google.com/p/google-api-adwords-perl/source/browse/tags/current/examples/v201309/basic_operations/update_keyword.pl
 ) 
but I cannot find the equivalent example in php.  I've seen this question a 
couple of times but not seen any answers.  My code looks like this:

$microBid = $bid * 1000000;

$adGroupCriterionService = $user->GetService('AdGroupCriterionService', 
ADWORDS_VERSION);
$criterion = new Criterion();
$criterion->id = $id; // id = keyword id

$adGroupCriterion = new BiddableAdGroupCriterion();
$adGroupCriterion->adGroupId = $adGroupId;
$adGroupCriterion->criterion = new Criterion($id);
$adGroupCriterion->userStatus = "ACTIVE";

$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingStrategyConfiguration->CpcBid = new Bid(new Money($microBid));
$biddingStrategyConfiguration->biddingStrategyType = "MANUAL_CPC";
$adGroupCriterion->biddingStrategyConfiguration = 
$biddingStrategyConfiguration;

$operation = new AdGroupCriterionOperation();
$operation->operand = $adGroupCriterion;
$operation->operator = 'SET';
$operations = array($operation);
$result = $adGroupCriteriaService->mutate($operations);

---
and the error I get is Call to a member function mutate() on a non-object

Anyone know the correct syntax for this?  Thanks,

Bill


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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 [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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to