Facebook's Audience Network serves ads on other publishers' iOS and Android apps and mobile websites. Then, you can use Facebook's targeting options to find your audience within those mobile apps and mobile websites.
On this page, see Audience Network rules for ad creative and placement. Then, learn to create ads:
Facebook's Audience Network delivers the ad’s image on the destination app:
MOBILE_APP_INSTALLS
MOBILE_APP_ENGAGEMENT
LINK_CLICKS
, see Blog, Video Expands to Website ClicksCONVERSIONS
, see Blog, Additional Options for VideoPRODUCT_CATALOG_SALES
Use combinations of bid type, billing event
and optimization goal
. See Optimization Simplification.
You must use audience_network
with another platform, such as facebook
. You cannot serve ads only on Audience Network.
publisher_platform | Description |
---|---|
| This allows the ad to serve on the Audience Network. |
We do not support IAB sizes.
For example, to create a link ad to deliver:
Create ad campaign. Set objective
to one of LINK_CLICKS
or CONVERSIONS
:
curl -X POST \
-F 'name="My campaign"' \
-F 'objective="OUTCOME_TRAFFIC"' \
-F 'status="PAUSED"' \
-F 'special_ad_categories=[]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/campaigns
Create the ad set with audience network placement:
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Fields\TargetingFields;
use FacebookAds\Object\Values\AdSetBillingEventValues;
use FacebookAds\Object\Targeting;
use FacebookAds\Object\Values\AdSetOptimizationGoalValues;
$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'My Ad Set',
AdSetFields::OPTIMIZATION_GOAL => AdSetOptimizationGoalValues::LINK_CLICKS,
AdSetFields::BILLING_EVENT => AdSetBillingEventValues::LINK_CLICKS,
AdSetFields::BID_AMOUNT => 2,
AdSetFields::DAILY_BUDGET => 1000,
AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
AdSetFields::TARGETING => (new Targeting())->setData(array(
TargetingFields::GEO_LOCATIONS => array(
'countries' => array('US'),
),
TargetingFields::PUBLISHER_PLATFORMS => array(
'facebook',
'audience_network',
),
TargetingFields::DEVICE_PLATFORMS => array('mobile'),
)),
));
$adset->create();
from facebookads.adobjects.adset import AdSet
from facebookads.adobjects.targeting import Targeting
adset = AdSet(parent_id='act_<AD_ACCOUNT_ID>')
adset.update({
AdSet.Field.name: 'My Ad Set',
AdSet.Field.campaign_id: <CAMPAIGN_ID>,
AdSet.Field.daily_budget: 1000,
AdSet.Field.billing_event: AdSet.BillingEvent.link_clicks,
AdSet.Field.optimization_goal: AdSet.OptimizationGoal.link_clicks,
AdSet.Field.bid_amount: 2,
AdSet.Field.targeting: {
Targeting.Field.geo_locations: {
'countries': ['US'],
},
Targeting.Field.publisher_platforms: ['facebook', 'audience_network'],
Targeting.Field.device_platforms: ['mobile'],
},
})
adset.remote_create(params={
'status': AdSet.Status.paused,
})
AdSet adSet = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdSet()
.setName("My Ad Set")
.setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_LINK_CLICKS)
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_LINK_CLICKS)
.setBidAmount(2L)
.setDailyBudget(1000L)
.setCampaignId(<CAMPAIGN_ID>)
.setTargeting(
new Targeting()
.setFieldDevicePlatforms(Arrays.asList(Targeting.EnumDevicePlatforms.VALUE_MOBILE))
.setFieldGeoLocations(
new TargetingGeoLocation()
.setFieldCountries(Arrays.asList("US"))
)
.setFieldPublisherPlatforms(Arrays.asList("facebook", "audience_network"))
)
.execute();
String ad_set_id = adSet.getId();
curl \
-F 'name=My Ad Set' \
-F 'optimization_goal=LINK_CLICKS' \
-F 'billing_event=LINK_CLICKS' \
-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"]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adsets
For your ad set, specify a placement and set publisher_platforms
under ad targeting
to audience_network
.
Provide link ad creative:
use FacebookAds\Object\AdCreative;
use FacebookAds\Object\AdCreativeLinkData;
use FacebookAds\Object\Fields\AdCreativeLinkDataFields;
use FacebookAds\Object\AdCreativeObjectStorySpec;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\Fields\AdCreativeFields;
$link_data = new AdCreativeLinkData();
$link_data->setData(array(
AdCreativeLinkDataFields::MESSAGE => 'try it out',
AdCreativeLinkDataFields::LINK => '<URL>',
AdCreativeLinkDataFields::IMAGE_HASH => '<IMAGE_HASH>',
));
$object_story_spec = new AdCreativeObjectStorySpec();
$object_story_spec->setData(array(
AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
AdCreativeObjectStorySpecFields::LINK_DATA => $link_data,
));
$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');
$creative->setData(array(
AdCreativeFields::NAME => 'Sample Creative',
AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec,
));
$creative->create();
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreative'<LINK>'data import AdCreativeLinkData
from facebookads.adobjects.adcreativeobjectstoryspec \
import AdCreativeObjectStorySpec
link_data = AdCreativeLinkData()
link_data[AdCreativeLinkData.Field.message] = 'try it out'
link_data[AdCreativeLinkData.Field.link] = '<LINK>'
link_data[AdCreativeLinkData.Field.image_hash] = '<IMAGE_HASH>'
object_story_spec = AdCreativeObjectStorySpec()
object_story_spec[AdCreativeObjectStorySpec.Field.page_id] = <PAGE_ID>
object_story_spec[AdCreativeObjectStorySpec.Field.link_data] = link_data
creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.name] = 'AdCreative for Link Ad'
creative[AdCreative.Field.object_story_spec] = object_story_spec
creative.remote_create()
print(creative)
AdCreative adCreative = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdCreative()
.setName("Sample Creative")
.setObjectStorySpec(
new AdCreativeObjectStorySpec()
.setFieldLinkData(
new AdCreativeLinkData()
.setFieldCaption("My caption")
.setFieldImageHash(<IMAGE_HASH>)
.setFieldLink(<URL>)
.setFieldMessage("try it out")
)
.setFieldPageId(<PAGE_ID>)
)
.execute();
String ad_creative_id = adCreative.getId();
curl \
-F 'name=Sample Creative' \
-F 'object_story_spec={
"link_data": {
"image_hash": "<IMAGE_HASH>",
"link": "<URL>",
"message": "try it out"
},
"page_id": "<PAGE_ID>"
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adcreatives
Create ad:
curl -X POST \
-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/v21.0/act_<AD_ACCOUNT_ID>/ads
To create a mobile app image ad with audience network placement:
Create an ad campaign. Set objective
to APP_INSTALLS
or MOBILE_APP_ENGAGEMENT
:
curl -X POST \
-F 'name="Mobile App Installs Campaign"' \
-F 'objective="OUTCOME_APP_PROMOTION"' \
-F 'status="PAUSED"' \
-F 'special_ad_categories=[]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/campaigns
Create the ad set. Specify audience network placement and set promoted_object
to the app ID:
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Fields\TargetingFields;
use FacebookAds\Object\Values\AdSetBillingEventValues;
use FacebookAds\Object\Targeting;
use FacebookAds\Object\Values\AdSetOptimizationGoalValues;
$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'Mobile App Installs Ad Set',
AdSetFields::PROMOTED_OBJECT => array(
'application_id' => <APP_ID>,
'object_store_url' => '<APP_STORE_URL>',
),
AdSetFields::OPTIMIZATION_GOAL => AdSetOptimizationGoalValues::APP_INSTALLS,
AdSetFields::BILLING_EVENT => AdSetBillingEventValues::IMPRESSIONS,
AdSetFields::BID_AMOUNT => 2,
AdSetFields::DAILY_BUDGET => 1000,
AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
AdSetFields::TARGETING => (new Targeting())->setData(array(
TargetingFields::GEO_LOCATIONS => array(
'countries' => array('US'),
),
TargetingFields::PUBLISHER_PLATFORMS => array(
'facebook',
'audience_network',
),
TargetingFields::DEVICE_PLATFORMS => array('mobile'),
TargetingFields::USER_OS => array(
'IOS',
)
)),
));
$adset->create();
from facebookads.adobjects.adset import AdSet
from facebookads.adobjects.targeting import Targeting
adset = AdSet(parent_id='act_<AD_ACCOUNT_ID>')
adset.update({
AdSet.Field.name: 'Mobile App Installs Ad Set',
AdSet.Field.promoted_object: {
'application_id': <APP_ID>,
'object_store_url': '<APP_STORE_URL>',
},
AdSet.Field.campaign_id: <CAMPAIGN_ID>,
AdSet.Field.daily_budget: 1000,
AdSet.Field.optimization_goal: AdSet.OptimizationGoal.app_installs,
AdSet.Field.billing_event: AdSet.BillingEvent.impressions,
AdSet.Field.bid_amount: 2,
AdSet.Field.targeting: {
Targeting.Field.geo_locations: {
'countries': ['US'],
},
Targeting.Field.publisher_platforms: ['facebook', 'audience_network'],
Targeting.Field.device_platforms: ['mobile'],
Targeting.Field.user_os: [
'IOS',
],
},
})
adset.remote_create(params={
'status': AdSet.Status.paused,
})
curl \
-F 'name=Mobile App Installs Ad Set' \
-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"],
"user_os": ["IOS"]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.8/act_<AD_ACCOUNT_ID>/adsets
Create mobile app ad image creative:
use FacebookAds\Object\AdCreative;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\Fields\AdCreativeLinkDataFields;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\AdCreativeLinkData;
use FacebookAds\Object\AdCreativeObjectStorySpec;
$link_data = (new AdCreativeLinkData())->setData(array(
AdCreativeLinkDataFields::MESSAGE => 'Message',
AdCreativeLinkDataFields::LINK => '<APP_STORE_URL>',
AdCreativeLinkDataFields::IMAGE_HASH => '<IMAGE_HASH>',
AdCreativeLinkDataFields::NAME => 'Link title',
AdCreativeLinkDataFields::CALL_TO_ACTION => array(
'type' => 'INSTALL_MOBILE_APP',
'value' => array(
'link' => '<APP_STORE_URL>',
),
),
));
$story = new AdCreativeObjectStorySpec();
$story->setData(array(
AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
AdCreativeObjectStorySpecFields::LINK_DATA => $link_data,
));
$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');
$creative->setData(array(
AdCreativeFields::OBJECT_STORY_SPEC => $story,
));
$creative->create();
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativelinkdata import AdCreativeLinkData
from facebookads.adobjects.adcreativeobjectstoryspec \
import AdCreativeObjectStorySpec
link_data = AdCreativeLinkData()
link_data.update({
AdCreativeLinkData.Field.message: 'Message',
AdCreativeLinkData.Field.link: '<APP_STORE_URL>',
AdCreativeLinkData.Field.image_hash: '<IMAGE_HASH>',
AdCreativeLinkData.Field.call_to_action: {
'type': 'INSTALL_MOBILE_APP',
'value': {
'link': '<APP_STORE_URL>',
'link_title': 'Link title',
},
},
})
story = AdCreativeObjectStorySpec()
story.update({
AdCreativeObjectStorySpec.Field.page_id: <PAGE_ID>,
AdCreativeObjectStorySpec.Field.link_data: link_data,
})
creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.object_story_spec] = story
creative.remote_create()
AdCreative adCreative = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdCreative()
.setObjectStorySpec(
new AdCreativeObjectStorySpec()
.setFieldLinkData(
new AdCreativeLinkData()
.setFieldCallToAction(
new AdCreativeLinkDataCallToAction()
.setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_INSTALL_MOBILE_APP)
.setFieldValue(
new AdCreativeLinkDataCallToActionValue()
.setFieldLink(<APP_STORE_URL>)
.setFieldLinkTitle("Link title")
)
)
.setFieldImageHash(<IMAGE_HASH>)
.setFieldLink(<APP_STORE_URL>)
.setFieldMessage("Message")
)
.setFieldPageId(<PAGE_ID>)
)
.execute();
String ad_creative_id = adCreative.getId();
curl \
-F 'object_story_spec={
"link_data": {
"call_to_action": {"type":"INSTALL_MOBILE_APP","value":{"link":"<APP_STORE_URL>"}},
"image_hash": "<IMAGE_HASH>",
"link": "<APP_STORE_URL>",
"message": "Message",
"name": "Link title"
},
"page_id": "<PAGE_ID>"
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adcreatives
Create ad:
curl -X POST \
-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/v21.0/act_<AD_ACCOUNT_ID>/ads
See Mobile App Ads.
To create a mobile app video ad with audience network placement, follow Step 1 and 2 from Image Ad For Audience Network. Then, provide video creative:
use FacebookAds\Object\AdCreative;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\Fields\AdCreativeVideoDataFields;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\AdCreativeVideoData;
use FacebookAds\Object\AdCreativeObjectStorySpec;
$video_data = new AdCreativeVideoData();
$video_data->setData(array(
AdCreativeVideoDataFields::VIDEO_ID => <VIDEO_ID>,
AdCreativeVideoDataFields::IMAGE_URL => '<THUMBNAIL_URL>',
AdCreativeVideoDataFields::CALL_TO_ACTION => array(
'type' => 'INSTALL_MOBILE_APP',
'value' => array(
'link' => '<APP_STORE_URL>',
),
),
));
$story = new AdCreativeObjectStorySpec();
$story->setData(array(
AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
AdCreativeObjectStorySpecFields::VIDEO_DATA => $video_data,
));
$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');
$creative->setData(array(
AdCreativeFields::OBJECT_STORY_SPEC => $story,
));
$creative->create();
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativevideodata import AdCreativeVideoData
from facebookads.adobjects.adcreativeobjectstoryspec \
import AdCreativeObjectStorySpec
video_data = AdCreativeVideoData()
video_data.update({
AdCreativeVideoData.Field.video_id: <VIDEO_ID>,
AdCreativeVideoData.Field.description: 'Creative description',
AdCreativeVideoData.Field.image_url: '<THUMBNAIL_URL>',
AdCreativeVideoData.Field.call_to_action: {
'type': 'INSTALL_MOBILE_APP',
'value': {
'link': '<APP_STORE_URL>',
'link_title': 'Link title',
},
},
})
story = AdCreativeObjectStorySpec()
story.update({
AdCreativeObjectStorySpec.Field.page_id: <PAGE_ID>,
AdCreativeObjectStorySpec.Field.video_data: video_data,
})
creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.object_story_spec] = story
creative.remote_create()
AdCreative adCreative = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdCreative()
.setObjectStorySpec(
new AdCreativeObjectStorySpec()
.setFieldPageId(<PAGE_ID>)
.setFieldVideoData(
new AdCreativeVideoData()
.setFieldCallToAction(
new AdCreativeLinkDataCallToAction()
.setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_INSTALL_MOBILE_APP)
.setFieldValue(
new AdCreativeLinkDataCallToActionValue()
.setFieldLink(<APP_STORE_URL>)
)
)
.setFieldImageUrl(<THUMBNAIL_URL>)
.setFieldVideoId(<VIDEO_ID>)
)
)
.execute();
String ad_creative_id = adCreative.getId();
curl \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"video_data": {
"call_to_action": {"type":"INSTALL_MOBILE_APP","value":{"link":"<APP_STORE_URL>"}},
"image_url": "<THUMBNAIL_URL>",
"video_id": "<VIDEO_ID>"
}
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adcreatives
To finish, create your ad. See Step 4 from Image Ad For Audience Network.
To create a video link ad with audience network placement:
Create ad campaign with objective
set to LINK_CLICKS
or CONVERSIONS
:
curl -X POST \
-F 'name="My campaign"' \
-F 'objective="OUTCOME_TRAFFIC"' \
-F 'status="PAUSED"' \
-F 'special_ad_categories=[]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/campaigns
Create the ad set with audience network placement:
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Fields\TargetingFields;
use FacebookAds\Object\Values\AdSetBillingEventValues;
use FacebookAds\Object\Targeting;
use FacebookAds\Object\Values\AdSetOptimizationGoalValues;
$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'My Ad Set',
AdSetFields::OPTIMIZATION_GOAL => AdSetOptimizationGoalValues::LINK_CLICKS,
AdSetFields::BILLING_EVENT => AdSetBillingEventValues::LINK_CLICKS,
AdSetFields::BID_AMOUNT => 2,
AdSetFields::DAILY_BUDGET => 1000,
AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
AdSetFields::TARGETING => (new Targeting())->setData(array(
TargetingFields::GEO_LOCATIONS => array(
'countries' => array('US'),
),
TargetingFields::PUBLISHER_PLATFORMS => array(
'facebook',
'audience_network',
),
TargetingFields::DEVICE_PLATFORMS => array('mobile'),
)),
));
$adset->create();
from facebookads.adobjects.adset import AdSet
from facebookads.adobjects.targeting import Targeting
adset = AdSet(parent_id='act_<AD_ACCOUNT_ID>')
adset.update({
AdSet.Field.name: 'My Ad Set',
AdSet.Field.campaign_id: <CAMPAIGN_ID>,
AdSet.Field.daily_budget: 1000,
AdSet.Field.billing_event: AdSet.BillingEvent.link_clicks,
AdSet.Field.optimization_goal: AdSet.OptimizationGoal.link_clicks,
AdSet.Field.bid_amount: 2,
AdSet.Field.targeting: {
Targeting.Field.geo_locations: {
'countries': ['US'],
},
Targeting.Field.publisher_platforms: ['facebook', 'audience_network'],
Targeting.Field.device_platforms: ['mobile'],
},
})
adset.remote_create(params={
'status': AdSet.Status.paused,
})
AdSet adSet = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdSet()
.setName("My Ad Set")
.setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_LINK_CLICKS)
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_LINK_CLICKS)
.setBidAmount(2L)
.setDailyBudget(1000L)
.setCampaignId(<CAMPAIGN_ID>)
.setTargeting(
new Targeting()
.setFieldDevicePlatforms(Arrays.asList(Targeting.EnumDevicePlatforms.VALUE_MOBILE))
.setFieldGeoLocations(
new TargetingGeoLocation()
.setFieldCountries(Arrays.asList("US"))
)
.setFieldPublisherPlatforms(Arrays.asList("facebook", "audience_network"))
)
.execute();
String ad_set_id = adSet.getId();
curl \
-F 'name=My Ad Set' \
-F 'optimization_goal=LINK_CLICKS' \
-F 'billing_event=LINK_CLICKS' \
-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"]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adsets
Upload a video with a link. Upload an unpublished video to your page with a call to action as a link. You can also upload videos to your ad account video library:
curl \
-F "title=Book your trip to Alaska" \
-F "picture=http://thumbnailurl.com/pic1" \
-F "source=<VIDEO_FORM_DATA>" \
-F "published=0" \
-F "call_to_action={'type':'BOOK_TRAVEL','value':{'link':'http://example.com'}}" \
-F "access_token=<PAGE_TOKEN>" \
https://graph-video.facebook.com/<API_VERSION>/<PAGE_ID>/videos
Provide ad creative. Use the page post ID to provide this:
curl -X POST \
-F 'name="Sample Promoted Post"' \
-F 'object_story_id="<PAGE_ID>_<POST_ID>"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/adcreatives
Create ad:
curl -X POST \
-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/v21.0/act_<AD_ACCOUNT_ID>/ads
On Audience Network, Facebook display only the first two child_attachments
in your carousel, in the order provided. For carousel ads on Audience Network, note the following:
objective
must be MOBILE_APP_INSTALLS
, MOBILE_APP_ENGAGEMENT
, LINK_CLICKS
, or CONVERSIONS
targeting/publisher_platforms
must include audience_network
See Ads Product Guide, Preview API, and Carousel Ads.
You can specify the Audience Network position in targeting at the ad set level:
"audience_network_positions": [ "classic", "instream_video"]
See Video Ads.
To use Audience Network as a placement for Advantage+ catalog ads:
objective=PRODUCT_CATALOG_SALES
targeting/publisher_platforms
must include audience_network
To preview for your Audience Network ad:
Call /previews
for your ad
Specify ad_format=
:
MOBILE_BANNER
for mobile app or web banner, MOBILE_INTERSTITIAL
for mobile app interstitial, orMOBILE_NATIVE
for mobile app or web native format previewsMOBILE_MEDIUM_RECTANGLE
MOBILE_FULLWIDTH
AUDIENCE_NETWORK_INSTREAM_VIDEO
AUDIENCE_NETWORK_OUTSTREAM_VIDEO
AUDIENCE_NETWORK_INSTREAM_VIDEO_MOBILE
AUDIENCE_NETWORK_REWARDED_VIDEO
AUDIENCE_NETWORK_NATIVE_BANNER
MESSENGER_MOBILE_INBOX_MEDIA
Mobile web previews appear the same as mobile app.
https://graph.facebook.com/<API_VERSION>/<AD_ID>/previews?ad_format=MOBILE_BANNER https://graph.facebook.com/<API_VERSION>/<AD_ID>/previews?ad_format=MOBILE_INTERSTITIAL https://graph.facebook.com/<API_VERSION>/<AD_ID>/previews?ad_format=MOBILE_NATIVE
The API returns an iFrame referencing its own CSS, and generates the preview image. This iFrame is only valid for 24 hours, see Ad Preview, Reference.
To your ad's performance in suggested videos feeds, query /insights
with breakdowns=['publisher_platform']
, see Ads Insights Guide. Results look like this:
{ ...... "spend": 9.23, "today_spend": 0, "total_action_value": 0, "total_actions": 1, "total_unique_actions": 1, "link_clicks": 0, "placement": "mobile_feed" }, { ...... "spend": 7.73, "today_spend": 0, "total_action_value": 0, "total_actions": 6, "total_unique_actions": 5, "link_clicks": 3, "placement": "mobile_video_channel" }, { ...... "spend": 6.23, "today_spend": 0, "total_action_value": 0, "total_actions": 3, "total_unique_actions": 2, "link_clicks": 1, "placement": "desktop_video_channel" },
mobile_feed
refers to Feed on Facebook Mobile, mobile_video_channel
is suggested videos feeds on mobile, and desktop_video_channel
is suggested videos feeds on desktop.