Facebook 从 image_hash 获取 AdImage url
Facebook get AdImage url from image_hash
我的代码(python-business-sdk):
account = AdAccount(ad_account_id)
img = account.get_ad_images(params={'hashes': ['6b709f0275d0bdf18fb78ef08492ee79'})[0]
print(img['url']) # doesnt work
primt(img[AdImage.Field.url]) # doesnt work
我发出了请求,但在我的 img
var (AdImage obj):
中只得到了 id 和 hash
'{..., _json': {'hash': '6b709f0275d0bdf18fb78ef08492ee79', 'id': '36246837:6b709f0275d0bdf18fb78ef08492ee79'}}}
但我需要图像的 url,这里是包含字段的文档(url
在那里)但我没有收到这些或者不知道如何获取..
https://developers.facebook.com/docs/marketing-api/reference/ad-image#examples_read
只需将字段参数添加到 get_ad_images
我的代码(python-business-sdk):
account = AdAccount(ad_account_id)
img = account.get_ad_images(params={'hashes': ['6b709f0275d0bdf18fb78ef08492ee79'})[0]
print(img['url']) # doesnt work
primt(img[AdImage.Field.url]) # doesnt work
我发出了请求,但在我的 img
var (AdImage obj):
'{..., _json': {'hash': '6b709f0275d0bdf18fb78ef08492ee79', 'id': '36246837:6b709f0275d0bdf18fb78ef08492ee79'}}}
但我需要图像的 url,这里是包含字段的文档(url
在那里)但我没有收到这些或者不知道如何获取..
https://developers.facebook.com/docs/marketing-api/reference/ad-image#examples_read