I tried this on my account and get a RESPONSE_SIZE_LIMIT_EXCEEDED when I
don't include a predicate to narrow it down to a single campaign. Is it
possible you're getting this error and it isn't throwing an exception? I'm
not familiar with the PHP client library. It might be worth throwing a
selector for campaignId in there to see what you get. When I limit by
campaign id, I get the expected results here, an entries array of
CampaignCriterion objects.
I'm also not sure what isset does in your code there. It might be worth
printing the full contents of $graph to check your assumptions on the sort
of data you're getting back?
You should probably get at least something back if you have any campaigns
in the account, because various other campaign settings will show up here
as well (platform, language, location, etc).
I should clarify that I'm still using 201209 and not 201302.
Steve
On Monday, March 25, 2013 1:28:28 PM UTC-4, Jon Perry wrote:
>
> I'm new to the AdWords API and I've been trying to select all of my
> campaign wide negative keywords through CampaignCriterionService. But I'm
> getting no results. I know I have campaign wide negative keywords. I'm
> using the PHP Client Library.
>
> I don't understand why this isn't returning results. Insights?
>
> $CampaignCriterionService =
> $this->user->GetService('CampaignCriterionService', ADWORDS_VERSION);
> $selector = new Selector();
> $selector->fields = array('CampaignId');
>
> try {
> $graph = $CampaignCriterionService->get($selector);
> } catch (Exception $e) {
> printf("An error has occurred: %s\n", $e->getMessage());
> }
>
> if (isset($graph->entries)) {
> print "Good to go.";
> } else {
> print "No entries were found.";
> }
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
---
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.