Hello Peter,
Thanks for the answer , here is my function and YES i have included the 
CreativeFinalUrls


    function GetTextAds($adGroupId)
    {
        // Get the service, which loads the required classes.
        $adWordsServices = new AdWordsServices();
        $adGroupAdService = $adWordsServices->get($this->ad_session, 
AdGroupAdService::class);
        
        $list_of_text_ads = [];
        // Create selector.
        $selector = new Selector();
        $selector->setFields( array('HeadlinePart1', 
'HeadlinePart2','Id','Status','Description','Url','DisplayUrl','CreativeFinalUrls',
 'Path1', 'Path2'));
        $selector->setOrdering([new OrderBy('Headline', 'ASCENDING')]);
        $selector->setPredicates([new Predicate('AdGroupId', 'IN', 
array($adGroupId)), new Predicate('AdType', 'IN', array('EXPANDED_TEXT_AD'))]);
        // By default disabled ads aren't returned by the selector. To return 
them
        // include the DISABLED status in a predicate.
//        $selector->predicates[] =
//            new Predicate('Status', 'IN', array('ENABLED', 'PAUSED', 
'DISABLED'));

        // Create paging controls.
        $selector->setPaging(new Paging(0, self::PAGE_LIMIT)) ;

        do {
            // Make the get request.
            $page = $adGroupAdService->get($selector);
            // Display results.
            if ($page->getEntries() !== null) {
                $totalNumEntries = $page->getTotalNumEntries();
                
                foreach ($page->getEntries() as $adGroupAd) {
                    array_push($list_of_text_ads, $adGroupAd);
                }
            } else {
                return false;
            }

            // Advance the paging index.
            $selector->getPaging()->setStartIndex(
                $selector->getPaging()->getStartIndex() + self::PAGE_LIMIT);
        } while ($selector->getPaging()->getStartIndex() < $totalNumEntries);
        
        return $list_of_text_ads;
    }




On Friday, December 8, 2017 at 7:09:26 AM UTC+1, Peter Oliquino wrote:
>
> Hi Nikola,
>
> Could you confirm if you have included the CreativeFinalUrls 
> <https://developers.google.com/adwords/api/docs/reference/v201710/AdGroupAdService.ExpandedTextAd#finalurls>
>  field 
> in the Selector 
> <https://developers.google.com/adwords/api/docs/reference/v201710/AdGroupAdService.Selector>
>  when 
> you used the AdGroupAdService.get() 
> <https://developers.google.com/adwords/api/docs/reference/v201710/AdGroupAdService#get>?
>  
> If not yet, I would recommend that you do so, and in the response, you will 
> need to iterate through the results of the CreativeFinalUrls field to 
> retrieve the array of final URLs you have specified for your ad. Let me 
> know if this helps.
>
> Thanks and regards,
> Peter
> AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/73d72547-c917-48d6-a6d4-acb8369ebb76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to