When i use adGroupCriteriaService() i get a list of Keywords where each
Keywords has 3 copys.
Here's the Code:
$selector = new Selector();
$selector->fields =
array('Id','AdGroupId','DestinationUrl','Status','MaxCpc','Text','MatchType');
$selector->predicates[] = new Predicate('AdGroupId',
'EQUALS', (float)$paramsAG['adwords_adgroupid']);
$selector->predicates[] = new Predicate('CriteriaType', 'IN',
array('KEYWORD'));
$page = $this->adGroupCriteriaService->get($selector);
So normaly the $page->entries retrieves an Arra with unique entries
[1,2,3,...]
But when i run the code the Array looks like this [1,1,1,2,2,2,3,3,3,...]
I'm using API v201109.
A Workaround to avoid this unwanted behavior is to make the array unique:
$allKeywords = array();
foreach($page->entries AS $k) {
$allKeywords[$k->criterion->id] = $k;
}
Any suggestions?
Best Regards
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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