Hello
I am not sure if I am doing something wrong, but when I run my code I get this returned:
#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