haive / google-api-adwords-php

Automatically exported from code.google.com/p/google-api-adwords-php
Apache License 2.0
0 stars 0 forks source link

hello i get ImageError.INVALID_IMAGE @ operations[0].operand.ad.image.data #98

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
im trying to add ImageAd to the campaings 
but i get this error 
ImageError.INVALID_IMAGE @ operations[0].operand.ad.image.data
i try png , jpg , and more 

im working in the sandbox 

maby someone can help me 
my code is from the examples - 

        $img_src = $baseurl_cut."uploads/aaa.png";
        $img_size = filesize($img_src);

        $imgbinary = file_get_contents($img_src);
        $img_str = base64_encode($imgbinary);

        echo "------------------------------------------<br>";
        echo '<img src="data:image/jpg;base64,'.$img_str.'" />';
        echo "------------------------------------------<br>";
#############################
on this example i do base64 and i see the pic in browers
#############################

    $textAd = new ImageAd();
    $textAd->name = "idan";
    $textAd->url = $array['ad_txt_url'];
    $textAd->displayUrl = $array['ad_txt_displayUrl'];
    $textAd->image->
    $textAd->image->data=$img_str;

Original issue reported on code.google.com by idanperi...@gmail.com on 1 Jul 2013 at 8:55

GoogleCodeExporter commented 8 years ago
what is issue resolved ?

Original comment by msgr...@gmail.com on 13 Aug 2013 at 7:44

GoogleCodeExporter commented 8 years ago
The sandbox environment has been deprecated. If you have more questions about 
this, please direct them to the AdWords APi Forum as they're more platform 
(than client) specific.

https://groups.google.com/forum/#!forum/adwords-api

Regards,

- Paul, AdWords API Team.

Original comment by api.pmat...@gmail.com on 26 Sep 2013 at 5:26