PRODUCT_CATALOG_SALES objective. You should specify a real estate catalog in promoted_object at the campaign level:curl \
-F 'name=DARE campaign' \
-F 'objective=PRODUCT_CATALOG_SALES' \
-F 'promoted_object={"product_catalog_id":"<PRODUCT_CATALOG_ID>"}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/campaigns
curl \
-F 'name=adset name' \
-F 'bid_amount=3000' \
-F 'billing_event=IMPRESSIONS' \
-F 'optimization_goal=OFFSITE_CONVERSIONS' \
-F 'daily_budget=15000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"geo_locations": {"countries":["US"]},
"dynamic_audience_ids": ["<DYNAMIC_AUDIENCE_ID>"]
}' \
-F 'promoted_object={"product_set_id":<PRODUCT_SET_ID>, "custom_event_type": "PURCHASE" }' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adsets
template_data in object_story_spec in the ad creative. You can also use template_url to define url in a more flexible way instead of using url from the feed. If template_url cannot be constructed at ads rendering time we will fall back to the url from the catalog.curl \
-F 'name=DARE creative' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"description": "{{home_listing.name | titleize}}",
"link": "http://www.EXAMPLE.com",
"message": "HOME LISTINGS!!!",
"name": "{{home_listing.num_beds}} beds / {{home_listing.num_baths}} baths | {{home_listing.price strip_zeros}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
{{...}} with the relevant value.| Template tag | Description |
|---|---|
home_listing.description | Description of home listing |
home_listing.name | Name |
home_listing.num_beds | Number of beds |
home_listing.num_baths | Number of baths |
home_listing.num_units | Number of units |
home_listing.price | Price of the home listing |
home_listing.year_built | Year the home was built |
home_listing.city | City provided in catalog |
home_listing.country | Country provided in catalog |
home_listing.region | Region provided in catalog |
home_listing.street_address | Street address provided in catalog |
curl \
-F 'name=DARE Alpha Ad' \
-F 'adset_id=<ADSET_ID>' \
-F 'creative={"creative_id":"<CREATIVE_ID>"}' \
-F 'tracking_specs=[{"action.type": ["offsite_conversion"],"fb_pixel": ["<PIXEL_ID>"]},{"action.type": ["post_engagement"],"page": ["<PAGE_ID>"],"post": ["<POST_ID>"]}]' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads