Hi, I am trying to get some data using tergetingIdeaService with keywords,
url and country as the search parameters. The code works just fine if I
exclude the url.
error: [CollectionSizeError.TOO_MANY @
selector.selector.searchParameters[2].urls; errorDetails:actual: 1, max: 0]
Any ideas?
Thanks!
Code:
$keyword = new Keyword();
$keyword->text = 'test';
$keyword->matchType = 'BROAD';
$keyword_array = array($keyword);
$relatedToKeywordSearchParameter = new
RelatedToKeywordSearchParameter($keyword_array);
$countryTargetSearchParameter = new LocationSearchParameter();
$location1 = new location();
$location1->id = '2840';
$countryTargetSearchParameter->locations = array($location1);
$relatedToUrlSearchParameter = new
RelatedToUrlSearchParameter('http://www.google.com/');
$targetingIdeaSelector = new TargetingIdeaSelector();
$targetingIdeaSelector->searchParameters = array(
$relatedToUrlSearchParameter
,$relatedToKeywordSearchParameter
,$countryTargetSearchParameter
);
$targetingIdeaSelector->ideaType = 'KEYWORD';
$targetingIdeaSelector->requestType = 'STATS';
$targetingIdeaSelector->requestedAttributeTypes =
array('CRITERION','TARGETED_MONTHLY_SEARCHES');
$targetingIdeaSelector->paging = new Paging(0,5);
$page = $targetingIdeaService->get($targetingIdeaSelector);
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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