Search code examples
facebookcurlads

Facebook ads API: adcreative creation fails with error


While trying to create an adcreative using the Facebook ads API, I am giving the following POST request:

curl -F 'title=yahoo test ad creative' -F 'name=yahoo_test_creative' -F 'body=this is a test ad created by yahoo' -F 'image_hash=' -F 'object_url=http://earthled.com' -F 'access_token=' https://graph.facebook.com/act_74021791/adcreatives

I am getting the following error:

{"error":{"type":"Exception","message":"The Adcreative Create Failed for the following reason: The destination URL of your creative has to be a valid web page.","code":1487390}}

The documentation url is: https://developers.facebook.com/docs/reference/ads-api/adcreative

Not able to figure out what is wrong with the object_url. Any help will be appreciated.


Solution

  • I had the same problem. It turned out that I needed to switch object_url to link_url because my account had not yet been migrated to the new settings. Maybe that'll help you too.