Does anyone have any suggestions?
On Friday, 29 January 2021 at 17:50:03 UTC Stephen Rostanti wrote:
> Hello
>
> I am not sure if I am doing something wrong, but when I run my code I get
> this returned:
>
> CampaignPage {#372 ▼
> #entries: null
> #totalNumEntries: 0
> #PageType: "CampaignPage"
> -parameterMap: array:1 [▼
> "Page.Type" => "PageType"
> ]
> }
>
> i.e. no campaigns are returned. My code is as follows:
>
> $oAuth2Credential = (new OAuth2TokenBuilder())
> ->withClientId($clientId)
> ->withClientSecret($clientSecret)
> ->withRefreshToken($refreshToken)
> ->build();
>
> $session = (new AdWordsSessionBuilder())
> ->withDeveloperToken($developerToken)
> ->withClientCustomerId($clientCustomerSecret)
> ->withOAuth2Credential($oAuth2Credential)
> ->build();
>
> $adWordsServices = new AdWordsServices();
>
> $campaignService = $adWordsServices->get($session, CampaignService::class);
>
> $selector = new Selector();
> $selector->setFields(array('Id', 'Name'));
> $selector->setOrdering(array(new OrderBy('Name', 'ASCENDING')));
>
> $selector->setPaging(new Paging(0, 100));
>
> $page = $campaignService->get($selector);
>
> Then I am just seeing what is the output of $page and that is what I put
> up top i.e. basically nothing. Does anyone know what could be going wrong
> here? Any help would be greatly appreciated.
>
> Kind regards
>
> Stephen
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/690413a0-4190-449c-8095-28b4113c78b1n%40googlegroups.com.