Hello,
I want to add keywords to my adgroups and I'm using the code below but
I'm geting te INTERNAL SERVER ERROR, can anywone help me please? Am I
doing something wrong here?
$groupId = (float) $_GET['groupId'];
$i=0;
foreach ($_POST['keywords'] as $keyword)
{
// Get the AdGroupCriterionService.
$adGroupCriterionService = $user-
>GetAdGroupCriterionService('v201003');
$adGroupId = (float) $groupId;
// Create keyword.
$keyword = new Keyword();
$keyword->text = $keyword;
$keyword->matchType = 'BROAD';
// Create biddable ad group criterion.
$keywordAdGroupCriterion[$i] = new BiddableAdGroupCriterion();
$keywordAdGroupCriterion[$i]->adGroupId = $adGroupId;
$keywordAdGroupCriterion[$i]->criterion = $keyword;
// Create operations.
$keywordAdGroupCriterionOperation[$i] = new
AdGroupCriterionOperation();
$keywordAdGroupCriterionOperation[$i]->operand =
$keywordAdGroupCriterion[$i];
$keywordAdGroupCriterionOperation[$i]->operator = 'ADD';
$operations[] = $keywordAdGroupCriterionOperation[$i];
}
// Add ad group criteria.
if(!empty($operations)) $result = $adGroupCriterionService-
>mutate($operations);
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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