1

How to using online-image/image link to create Ad Creative? Such as the http://images.kuaizitech.com/jpg/xxx.jpg

Because at first, our programmatic creative platform system will generate a series of images; then we will use the FB marketing API to push ad.

See the process as the bellow: The Book an AD need creative field, then Create the AdCreative need image_hash field, finally the Ad Creative need @<IMAGE_PATH>.

tags: image_hash ,online-image/a image link ,Creative

show the code snippets

Community
  • 1
  • 1
王世刚
  • 27
  • 6

1 Answers1

1

If you check the documentation of Facebook Marketing API for AdCreative (as of time of writing is v2.5):-

https://developers.facebook.com/docs/marketing-api/reference/ad-creative

There is a field image_url. Specify that instead of image_hash.

If you go to the 'Creating->image_url' part of the document:-

"A URL for the image for this creative. You should not use image URLs returned from the FB CDN but instead have the image hosted on your own servers. The image specified at the URL will be saved into the ad account's image library and cannot exceed 8 MB in size. One of these three fields should be specified: image_file, image_hash, or image_url."

Hope this helps. :)

wai
  • 8,923
  • 4
  • 24
  • 19
  • When I trying to call the code ad below: `curl \ -F 'name=Sample Creative' \ -F 'object_story_spec={ "link_data": { "caption": "My caption", "image_url": "https://XXX.png", "link": "http://www.kuaizi.co/", "message": "try it out" }, "page_id": "XXX" }' \ -F 'access_token=XXX' \ https://graph.facebook.com/v2.5/act_440416429496126/adcreatives` Error msg: The field image_url is not supported in the field link_data of object_story_spec. – 王世刚 Feb 17 '16 at 10:01
  • 1
    Hi, I see your problem. :D Once again I would like to point you to the documentation. It appears that you are using the 'link_data' ObjectStorySpec:- https://developers.facebook.com/docs/marketing-api/reference/ad-creative-link-data/ There is a field called 'picture'. Use that instead of 'image_url' or 'image_hash'. The explanation on the page:- "URL of a picture to use in the post. Specify this field or image_hash but not both. See post for more info. The image specified at the URL will be saved into the ad accounts image library". Hope this helps! :D @王世刚 – wai Feb 17 '16 at 10:43