title: Creating Ad Creatives using Facebook Marketing API
body: <p>I am trying to create an ad creative that links to an external landing page, with URL tags. The <a href="https://developers.facebook.com/docs/marketing-api/validation/v2.12#creative" rel="noreferrer">Marketing API Documentation</a> provides the following example (slightly modified):</p>
  
  <pre><code>curl \
  -F 'name=Sample Creative' \
  -F 'title=my title' \
  -F 'body=my body' \
  -F 'url_tags=utm_medium=tag=TAG' \
  -F 'object_url=https://www.link.com' \
  -F 'link_url=https://www.link.com' \
  -F 'image_hash=&lt;IMAGE_HASH&gt;' \
  -F 'access_token=&lt;ACCESS_TOKEN&gt;' \
   https://graph.facebook.com/v2.12/act_&lt;AD_ACCOUNT_ID&gt;/adcreatives
  </code></pre>
  
  <p>This generates an error with the message:</p>
  
  <blockquote>
    <p>Ads and ad creatives must be associated with a Facebook Page. Try connecting your ad or ad creative to a Page and resubmit your ad.</p>
  </blockquote>
  
  <p>If I include <code>-F 'object_id=&lt;PAGE_ID&gt;'</code> I get a different error:</p>
  
  <blockquote>
    <p>The object you are trying to promote is ambiguous. You must specify only one promoted object. You specified the following: object_id, object_url.</p>
  </blockquote>
  
  <p>If I then remove the object_url field, but retain link_url, I get:</p>
  
  <blockquote>
    <p>Creative must have a valid destination URL, and if attached object is page, destination must match page.</p>
  </blockquote>
  
  <p>Using actor_id or page_id instead of object_id does not resolve the problem.</p>
  
  <p>The only way I can get the call to run without an error is something like:</p>
  
  <pre><code>curl \
  -F 'name=Sample Creative' \
  -F 'title=my title' \
  -F 'body=my body' \
  -F 'object_id=&lt;PAGE_ID&gt;' \
  -F 'url_tags=utm_medium=tag=TAG' \
  -F 'image_hash=&lt;IMAGE_HASH&gt;' \
  -F 'access_token=&lt;ACCESS_TOKEN&gt;' \
   https://graph.facebook.com/v2.12/act_&lt;AD_ACCOUNT_ID&gt;/adcreatives
  </code></pre>
  
  <p>However, that does not contain the link to the external website.</p>
  
  <p>It appears the Nov, 2017 policy change requiring ad creatives to be associated with an existing Facebook page (which I have) means that there is no combination of object_id, object_url and link_url to let me do what I want to do.  </p>