I'm new to using adWords and the API, I'm using code based on the PHP
examples and some Test accounts.
I've been able to do most of the things I need to do except the API will
not return my adGroups.
API response looks like: AdGroupPage Object ( [entries] =>
[totalNumEntries] => 0 [PageType] => AdGroupPage
[_parameterMap:Page:private] => Array ( [Page.Type] => PageType )
I retrieve my campaigns and loop through them and try to get the adGroups
from each one, something like this:
foreach ($campaigns->entries as $campaign) {
$adGroupService = $user->GetService('AdGroupService', ADWORDS_VERSION);
// Create selector.
$selector = new Selector();
$selector->fields = array('Id', 'Name');
$selector->ordering[] = new OrderBy('Name', 'ASCENDING');
// Create predicates.
$selector->predicates[] =
new Predicate('CampaignId', 'IN', array($campaign->id));
// Create paging controls.
$selector->paging = new Paging(0,
AdWordsConstants::RECOMMENDED_PAGE_SIZE);
$result = $adGroupService->get($selector);
}
I've tried removing the campaignId feature (i'd expect this to return all
adGroups from the account?) but that also returns nothing. Is there
something I need to do to the account or groups before the api will return
them?
Thanks
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/d3facaeb-de0f-4ee4-83e6-dd00bc5bf2a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.