I found on the web only a single example of using MobileImageAd (duplicated in several places).
i'm trying to adapt it to version='v201402' (yes, i know it's deprecated since last week, I assume the problems are the same)
Here's my current code:
image = {
'dimensions': [{
'key': 'FULL',
'value': {'width': width, 'height': height }
}],
'name': 'sample.jpg',
'data': base64.encodestring( Utils.ReadFile(image_file) )
}
operations = [{
'operator': 'ADD',
'operand': {
'xsi_type': 'AdGroupAd',
'adGroupId': adgroup_id,
'ad': {
'xsi_type': 'MobileImageAd',
'markupLanguages': ['HTML'], # why do I need it anyway?
'mobileCarriers': ['T-Mobile@US', 'Verizon@US'],
'image': image,
'url': destination_url,
'displayUrl': display_url
}
}
}]
first problem:
"ImageError.FILE_TOO_LARGE" -- why? it's only 8k (attached).
2nd problem: carriers:
AdError.INVALID_MOBILE_CARRIER_TARGET @ operations[0].operand.ad.mobileCarriers
According to the docs, they should be accepted. This was also the syntax for the 2011 api-version. Why not?
For now I ended up using "ALLCARRIERS". But I'd like to target carriers, too
3rd problem:
AdError.INVALID_AD_ADDRESS_CAMPAIGN_TARGET
(according to the docs it has nothing to do with "url" and "display_url", which i won't disclose here, but are perfectly valid URLs in my case)
I do not understand this error
"INVALID_AD_ADDRESS_CAMPAIGN_TARGET User cannot create mobile ad for countries targeted in specified campaign."
thank you