I'm trying to extract data from an existing ResponsiveDisplayAd and move it 
to another following the example in AddResponsiveDisplayAd.php and instead 
of calling:

$image->setData(file_get_contents('http://goo.gl/3b9Wfh'));

would like to call 

$image->setData($originalImage->getData());

The documentation here 
(https://developers.google.com/adwords/api/docs/reference/v201702/MediaService.Image)
 
doesn't lead me to believe that I need to add anything to my selectors. 
These are what I'm selecting right now when I hit the AdGroupService:

$selector->setFields([
        'Id',
        'AdType',
        'BaseAdGroupId',
        'CreativeFinalUrls',
        'CreativeTrackingUrlTemplate',
        'Name',
        'Dimensions',
        'DisplayUrl',
        'MarketingImage',
        'LogoImage',
        'ShortHeadline',
        'LongHeadline',
        'Description',
        'BusinessName',
        'MediaId',
        'Urls'
]);

In the results I access the image via

*foreach *($page->getEntries() *as *$adGroupAd) {
        $currAd = $adGroupAd->getAd();
        $marketingImage = $currAd->getMarketingImage();

        $marketingImage->getData() === null // true
        $marketingImageURLs = $marketingImage->getUrls();

        $marketingImageURLs[0]->getValue(); // string of image URL
}

I don't want to have to use file_get_contents with the image's URL like the 
example, getData() seems like it should be the way to do this. Any help is 
greatly appreciated.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/95a5e238-9a78-4eb0-b9f4-a1995a19f3cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • call... Joel Shapiro
    • ... 'Peter Oliquino' via AdWords API Forum
      • ... Joel Shapiro
        • ... 'Peter Oliquino' via AdWords API Forum
          • ... Joel Shapiro
            • ... 'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum

Reply via email to