M
M
MalekBV2021-07-13 19:14:03
Python
MalekBV, 2021-07-13 19:14:03

Facebook how to get AdImage url from image_hash?

My code (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


I make a request but only get the id and hash in my img variable (which is an AdImage):
'{..., _json': {'hash': '6b709f0275d0bdf18fb78ef08492ee79', 'id': '36246837:6b709f0275d0bdf18fb78ef08492ee79'}}}


But I need the url of the image, here is the documentation where the fields are indicated, where the url is, but it does not come .. or I don’t know how to get it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MalekBV, 2021-07-13
@MalekBV

Add fields to get_ad_images

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question