Add Interactive Elements

You can add interactive elements so people can engage in your Instagram Stories ads.

Polling Stickers

Currently, we offer the option to add a polling sticker to your ad.

To create an Instagram Story ad with a polling sticker, add the interactive_components_spec object to your ad creative object:

curl \
  -F 'name=Sample Creative TESTING' \
  -F 'object_story_spec={ 
    "page_id": "PAGE_ID", 
    "instagram_actor_id": "INSTAGRAM_ACTOR_ID",
    "photo_data": {
        "call_to_action": {
            "type": "LEARN_MORE",
            "value": {"link": "www.advertiserwebsite.com"}
        },
          "image_hash":"IMAGE_HASH",} 
  }' \
  -F 'interactive_components_spec={
    "components": [{
      "type": "poll",
      "poll_spec": {
        "question_text": "Which option do you like?",
        "option_a_text": "NONE",
        "option_b_text": "ALL",
      },
      "position_spec" : {
        "x":0.5,
        "y":0.5,
        "width": 0.5,
        "height": 0.2,
        "rotation": 0,
      }
    }]
  }' \
  -F 'access_token=<ACCESS TOKEN>' \
  https://graph.facebook.com/v19.0/act<AD_ACCOUNT_ID>/adcreatives

You use these options at the same object level as object_story_spec in your ad creative. For more information on supported options, see Ad Creative, Reference. You can also preview these ads with the INSTAGRAM_STORY ad format.

Aspect Ratios

For a polling sticker, you should have an aspect ratio (i.e., width to height ratio) of 3.2:1. You can provide any aspect ratio for the original width and height, and Facebook will automatically modify the dimensions so your aspect ratio is 3.2:1.

We preserve one of the dimensions and shrink the other one so that the sticker aspect ratio is 3.2:1. For example, after conversion to a standard media convention, such as 72dpi, if your original dimensions are:

  • 400px by 100px in absolute width and height, after conversion the new resized dimensions are 320px and 100px.
  • 320px by 200px in absolute width and height, the resized dimensions are 320px width and 100px height.
  • 320px width and 100px height in absolute terms, the resized dimensions would still be 320px width and 100px height.

After we convert your sticker based on the required aspect ratio, we require that:

  • Sticker height should be between 3% to 16% relative to the media height.
  • Sticker width should be between 20% to 90% relative to the media width.

If you specify rotation, we rotate the sticker. After we rotate it, we verify that no part of the sticker overlaps with any ad creative media, such as images or videos. No overlap occurs in:

  • Top-most 15% of the media
  • Bottom-most 15% of the media
  • Left-most 10% of the media
  • Right-most 10% of the media

Read Poll Results

You can get reporting information about the number of votes for each option in your poll. Use the following action breakdowns in your request:

  • interactive_component_tap
  • interactive_component_sticker_id
  • interactive_component_sticker_response

For interactive_component_sticker_response, the response 0 means the left option from your poll, while 1 means the right option.

To get aggregated polling responses:

curl -G \
  -d "fields=interactive_component_tap" \
  -d "access_token=<ACCESS_TOKEN" \
  "https://graph.facebook.com/v19.0/<AD_ID>/insights"

To report on aggregated polling responses by polling option:

curl -G \
  -d "fields=interactive_component_tap" \
  -d "action_breakdowns=interactive_component_sticker_id,interactive_component_sticker_response" \
  -d "access_token=<ACCESS_TOKEN>" \
  "https://graph.facebook.com/v19.0/<AD_ID>/insights"

Product Tags

You can add product tags to your ads, using the product tag spec under interactive_components_spec. Under ccomponent, you will need to specify:

  • type as product_tag
  • product_id under product_tag_spec
    Note: The products need to be approved before it can be tagged.
  • The x and y parameters of position_spec
    Note: The x and y parameters are required for image ads and optional for video ads.

Sample of a single interactive_components_spec feed image/video media

curl \
  -F 'name=Sample Creative TESTING' \
  -F 'object_story_spec={
      "link_data": {
            "link": "https://www.facebook.com/",
            "attachment_style": "link",
            "call_to_action": {
                "value": {},
                "type": "LEARN_MORE"
            },
            "image_hash": "IMAGE_HASH",
            "image_crops": {},
            "preferred_image_tags": {},
            "media_elements": {},
            "customization_rules_spec": {},
            "retailer_item_ids": {},
            "collection_thumbnails": {}
        },
       "page_id": "PAGE_ID",
       "instagram_actor_id": "INSTAGRAM_ACTOR_ID"
    }

' \
  -F 'interactive_components_spec={
      "components": [
    {
      "type": "product_tag",
      "product_tag_spec": {
        "product_id": 4382881195057752
      },
      "position_spec": {
        "x": 0.5,
        "y": 0.5,
      }
    }
  ]
}' \
  -F 'access_token=<ACCESS TOKEN>' \
  https://graph.facebook.com/v19.0/act_<AD_ACCOUNT_ID>/adcreatives

Sample of multiple interactive_components_spec objects for feed carousel media

curl \
  -F 'name=Sample Creative TESTING' \
  -F 'object_story_spec={
      "link_data": {
            "link": "https://www.facebook.com/",
            "attachment_style": "link",
            "call_to_action": {
                "value": {},
                "type": "LEARN_MORE"
            },
            "image_hash": "IMAGE_HASH",
            "image_crops": {},
            "preferred_image_tags": {},
            "media_elements": {},
            "customization_rules_spec": {},
            "retailer_item_ids": {},
            "collection_thumbnails": {}
        },
       "page_id": "PAGE_ID",
       "instagram_actor_id": "INSTAGRAM_ACTOR_ID"
    }' \
  -F 'interactive_components_spec={
        "child_attachments": [
            {
                "components": [
                    {
                        "type": "product_tag",
                        "position_spec": {
                            "x": 0.5,
                            "y": 0.5
                        },
                        "product_tag_spec": {
                            "product_id": 4382881195057752
                        }
                    }
                ]
            },
            {
                "components": [
                    {
                        "type": "product_tag",
                        "position_spec": {
                            "x": 0.2,
                            "y": 0.8
                        },
                        "product_tag_spec": {
                            "product_id": 4382881195057752
                        }
                    }
                ]
            },
            {
                "components": [
                    {
                        "type": "product_tag",
                        "position_spec": {
                            "x": 0.3,
                            "y": 0.7
                        },
                        "product_tag_spec": {
                            "product_id": 4382881195057752
                        }
                    }
                ]
            }
        ]
    }'\
  -F 'access_token=<ACCESS TOKEN>' \
  https://graph.facebook.com/v19.0/act<AD_ACCOUNT_ID>/adcreatives

Read Product Tag Information

You can get information about the product_id in your product_tag_spec object from an ad creative you created with the product_tag type.

To retrieve the product_tag_spec information from your ad creative:

curl -G \
  -d "fields=interactive_components_spec" \
  -d "access_token=<ACCESS_TOKEN>" \
  "https://graph.facebook.com/v19.0/<AD_CREATIVE_ID>"

Sample Response

{
  "interactive_components_spec": {
    "components": [
      {
        "position_spec": {
          "x": 0.5,
          "y": 0.5
        },
        "type": "PRODUCT_TAG",
        "product_tag_spec": {
          "product_id": "4382881195057752"
        }
      }
    ]
  },
  "id": "23862467608880374"
}