How to Create a Playable Ad

Requirements

Your playable ad is built as an HTML file that is uploaded to your ad account. In order to create a playable ad using the process described below, you will need the following:

  • A lead-in video to show in the News Feed.
  • The HTML file contained in the ad.
  • A name to differentiate the ad from other playable ads in the ad account.
  • An access token. The access token can be generated with the Graph API Explorer tool.
  • The ad account ID.

The playable ad must follow the specifications described in Ads Help Center, Specifications for Playable Ads.

1. Create your campaign.

curl -X POST \
  -F 'name=My Campaign Name' \
  -F 'objective=APP_INSTALLS' \
  -F 'status=PAUSED' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/campaigns

2. Create an ad set.

The ad set's placements can include one or more of Facebook News Feed, Instagram Feed, Instagram Stories, and Audience Network's Rewarded Video. The playable version of the ad can run only in Facebook News Feed or Audience Network's Rewarded Video. If your ad set also uses other placements, you can choose to upload more than one video for the ad, and specify which video is to be used in each placement.

The following example uses publisher_platforms, facebook_positions, and audience_network_positions.

curl \
  -F 'name=Playables Ad Set Test' \
  -F 'promoted_object={"application_id":"<APP_ID>","object_store_url":"<APP_STORE_URL>"}' \
  -F 'optimization_goal=APP_INSTALLS' \
  -F 'billing_event=IMPRESSIONS' \
  -F 'bid_amount=2' \
  -F 'daily_budget=1000' \
  -F 'campaign_id=<CAMPAIGN_ID>' \
  -F 'targeting={
    "device_platforms": ["mobile"],
    "geo_locations": {"countries":["US"]},
    "publisher_platforms": ["facebook","audience_network"],
    "facebook_positions": ["feed"],
    "audience_network_positions": ["rewarded_video"],
    "user_os": ["ANDROID"]
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/adsets

3. Upload your HTML file to an ad account.

Upload your HTML file to an ad account using the following CURL statement:

curl \
  -X POST \
  -F "name=playable_sample_name" \
  -F "source=@<SOURCE_LOCATION>" \
  -F "access_token=<ACCESS_TOKEN>" \
  https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/adplayables

If the call is successful, you will receive a JSON response containing your playable asset ID. This ID is used in a later step.

4. Upload the video file to an ad account.

News Feed shows a video before redirecting to the Playable Ad.

curl \
  -F 'source=@<SOURCE_LOCATION>' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph-video.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/advideos

5. Create the ad creative.

curl \
  -F 'name=Playable Ad Creative' \
  -F 'object_story_spec={
    "page_id": "<PAGE_ID>",
    "video_data": {
      "call_to_action": {
        "type":"INSTALL_MOBILE_APP",
        "value":{
          "application":<APP_ID>,
          "link":"<APP_STORE_URL>"
        }
      },
      "image_url": "<THUMBNAIL_URL>",
      "link_description": "try it out",
      "video_id": "<VIDEO_ID>"
    }
  }' \
  -F 'playable_asset_id=<PLAYABLE_ASSET_ID>' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/adcreatives

If the call is successful, you will receive a JSON response containing your creative ID. Use this ID in the next step.

6. Create the ad.

curl -X POST \
  -F 'name=Playable Ads Sample Name' \
  -F 'status=PAUSED' \
  -F 'adset_id=<AD_SET_ID>' \
  -F 'creative={"creative_id":"<CREATIVE_ID>"}' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/ads