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/6f4841f5-a605-4bee-afcc-a330f775db86n%40googlegroups.com.

Reply via email to