Start conversations in Messenger with ads placed in Facebook News Feed, Instagram, or Messenger Inbox to a Messenger bot or live chat.
app_destination
field to MESSENGER
and provide a welcome in the first open thread.object_story_id
.Create ads with messages
or conversion
objective. The Messages objective optimizes delivery of ads to people more likely to respond to your business in Messenger and should be used for most click to Messenger campaigns. The Conversions objective should be used by advertisers if they're tracking events with a Facebook pixel and driving conversion events at scale.
Use any targeting; however, only people with Messenger installed see your ad. Supported placements are desktop, mobile feed, and Messenger Home. There is no support for right hand side or audience network placements. There are various CONVERSATIONS
and billing_event
combinations you can use. See Valid Optimizations below.
Example — billing_event=IMPRESSIONS
, optimization_goal=IMPRESSIONS
, and a manual bid is set
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Values\BillingEvents;
use FacebookAds\Object\Values\OptimizationGoals;
use FacebookAds\Object\Fields\TargetingSpecsFields;
use FacebookAds\Object\TargetingSpecs;
$adset = new AdSet(null, <AD_ACCOUNT_ID>);
$adset→setData(array(
AdSetFields::NAME => 'My AdSet',
AdSetFields::OPTIMIZATION_GOAL => OptimizationGoals::IMPRESSIONS,
AdSetFields::BILLING_EVENT => BillingEvents::IMPRESSIONS,
AdSetFields::BID_AMOUNT => 200,
AdSetFields::DAILY_BUDGET => 100000,
AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
AdSetFields::TARGETING => (new TargetingSpecs())→setData(array(
TargetingSpecsFields::GEO_LOCATIONS => array(
'countries' => array(
'US',
),
),
TargetingSpecsFields::PAGE_TYPES => array(
PageTypes::MOBILE_FEED,
),
TargetingSpecsFields::USER_ADCLUSTERS => array(
array(
'id' => 6002714885172,
'name' => 'Cooking',
),
array(
'id' => 6002714898572,
'name' => 'Small Business Owners',
),
),
)),
));
$adset→create(array(
AdSet::STATUS_PARAM_NAME => AdSet::STATUS_ACTIVE,
));
Set app_destination
to MESSENGER
. Provide a default welcome message as string
in page_welcome_message
; this appears when an ad opens in Messenger. Or, provide a default template message or a series of up to 5 template messages as Custom JSON Message Blob.
To provide a single image ad creative:
curl \ -F 'name=Sample Creative for Messenger' \ -F 'object_story_spec={ "link_data": { "call_to_action": {"type":"LEARN_MORE","value":{"app_destination":"MESSENGER"}}, "image_hash": "<IMAGE_HASH>", "link": "<URL>", "message": "Welcome message", }, "page_id": "<PAGE_ID>" }' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
For video ads:
curl \ -F 'name=Sample Creative' \ -F 'object_story_spec={ "page_id": "<PAGE_ID>", "video_data": { "call_to_action": { "type": "LEARN_MORE", "value": { "app_destination": "MESSENGER", } }, "link_description": "Try it out", "image_url": "<THUMBNAIL_URL>", "page_welcome_message": "Welcome message in messenger", "video_id": "<VIDEO_ID>" } }' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
To provide video ad creative with two template replies:
curl \ -F 'name=Sample Creative' \ -F 'object_story_spec={ "page_id": "<PAGE_ID>", "video_data": { "call_to_action": { "type": "LEARN_MORE", "value": { "app_destination": "MESSENGER", } }, "link_description": "Try it out", "image_url": "<THUMBNAIL_URL>", "page_welcome_message": "[ { 'message': { 'attachment': { 'type': 'video', 'payload': { 'url': '...', } } } }, { 'message': { 'text':'Pick a color:', 'quick_replies': [ { 'content_type':'text', 'title':'Red', 'payload':'Red' }, { 'content_type':'text', 'title':'Blue', 'payload':'Blue' } ] } }]", "video_id": "<VIDEO_ID>" } }' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
See Ad Creative, Reference and Message Templates, Reference.
For more details, see Ad.
Below is a table of valid CONVERSATIONS
and billing_event
combinations for ads that click to Messenger. For each combination, automatic and manual bid amount can be set.
optimization_goal | billing_event |
---|---|
CONVERSATIONS | IMPRESSIONS |
CONVERSIONS | IMPRESSIONS |
More details on valid optimization_goal
and billing_event
combinations for ads can be found here.
Sponsored messages are a type of ad that can be sent directly as a message to people that have an open conversation with your business in Messenger.
MESSAGES
objectivecurl \ -F 'name=My campaign' \ -F 'objective=MESSAGES' \ -F 'status=PAUSED' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/campaigns
These restrictions apply to Sponsored Message Ad Sets:
billing_event=IMPRESSIONS
, optimization_goal=IMPRESSIONS
only. Minimum bid varies per country, see minimum bids.messenger
as a publisher_platforms
in targeting
. Note: Mixed placements are not allowed with Sponsored Message and you must target only Messenger.sponsored_messages
as a messenger_positions
in targeting.device_platforms
must be both mobile
and desktop
.promoted_object
.Create a new ad set:
curl \ -F 'name=Sponsored Messages Ad Set' \ -F 'optimization_goal=IMPRESSIONS' \ -F 'billing_event=IMPRESSIONS' \ -F 'bid_amount=2500' \ -F 'daily_budget=10000' \ -F 'campaign_id=<CAMPAIGN_ID>' \ -F 'targeting= {"publisher_platforms":["messenger"], "messenger_positions":["sponsored_messages"], "device_platforms":["mobile", "desktop"]}' \ -F 'status=PAUSED' \ -F 'promoted_object={"page_id":<PAGE_ID>}' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adsets
See Ad Set, Reference and Placements, Reference.
messenger_sponsored_message
field. The format of the message is same as used by Messenger Platform.curl \ -F 'object_id=<PAGE_ID>' \ -F 'object_type=SHARE' \ -F 'messenger_sponsored_message={"message":{"text":"Sample Text", "quick_replies":[{"title":"Quick Reply Text", "content_type":"text"}]}}' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
curl \ -F 'object_id=<PAGE_ID>' \ -F 'object_type=SHARE' \ -F 'messenger_sponsored_message={"message":{"attachment":{"type":"template", "payload":{"template_type":"generic", "elements":[{"title":"Image Text", "buttons":[{"type":"web_url", "title":"button text", "url":"<URL>"}], "image_hash":"<IMAGE_HASH>"}]}},"text":"Ad text"}}' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
curl \ -F 'name=My Ad' \ -F 'adset_id=<AD_SET_ID>' \ -F 'creative={"creative_id":"<CREATIVE_ID>"}' \ -F 'status=PAUSED' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads
See Ad, Reference.