You can add interactive elements so people can engage in your Instagram ads.
Currently, we offer the option to add a polling sticker to your ad.
To create an Instagram 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/v21.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 proper ad format.
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:
After we convert your sticker based on the required aspect ratio, we require that:
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:
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/v21.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/v21.0
/<AD_ID>/insights"
You can add product tags to your ads, using the product_tag_spec
under interactive_components_spec
. Under component
, you will need to specify:
type
as product_tag
product_id
under product_tag_spec
x
and y
parameters of position_spec
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/v21.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/v21.0
/act<AD_ACCOUNT_ID>/adcreatives
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/v21.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" }
This feature automatically tags best-matched products from the your product catalog when you create ads using single images or carousel images you've uploaded and applies the relevant product tags to ads.
The automated tagging ad system detects matches in two ways:
If product tags are specified in the interactive_components_spec
parameter, the automated tagging feature will be disabled for the ad to respect product tags that are specified by you.
Note: This feature is enabled by default. Set enroll_status
to opt_out
in the interactive_components_spec
parameter to opt out of the feature per product item.
"interactive_components_spec": { "components": [ { "type": "product_tag", "enroll_status": "opt_out" } ] }
Note: You cannot set enroll_status
and product_tag_spec
at the same time; it will return an error.