Back to News for Developers

New Products and Formats in Audience Network

August 20, 2015ByChristine Lu

In the past year, the Audience Network has become one of the largest and best performing mobile ad networks in the world. We are now enabling new advertising objectives and formats in the Audience Network:

  • Carousel ads: In this first phase, the carousel format, available for both mobile app and link ads, will support the first two images the advertiser uploads. We will enable additional images and cards over the next few weeks.

  • Dynamic product ads (DPA): Designed primarily for retailers and e-commerce businesses with large product catalogs to create personalized ads for their shoppers on Facebook, dynamic product ads are now eligible to run on the Audience Network. These ads will be displayed in the above mentioned carousel format or single creative format.

All new ad campaigns are now eligible to deliver in the Audience Network.

Example video mobile app ad creation:

Step 1. Create an ad campaign with MOBILE_APP_INSTALLS or MOBILE_APP_ENGAGEMENT objective

use FacebookAds\Object\AdCampaign;
use FacebookAds\Object\Fields\AdCampaignFields;

$campaign = new AdCampaign(null, $account_id);
$campaign->setData(array(
AdCampaignFields::NAME => 'my campaign group',
AdCampaignFields::STATUS => AdCampaign::STATUS_PAUSED,
AdCampaignFields::OBJECTIVE => AdObjectives::MOBILE_APP_INSTALLS,
));

$campaign->create();
from facebookads.objects import AdCampaign

campaign = AdCampaign(parent_id='act_<AD_ACCOUNT_ID>')

campaign[AdCampaign.Field.name] = 'my campaign group'
campaign[AdCampaign.Field.status] = AdCampaign.Status.paused
campaign[AdCampaign.Field.objective] = AdCampaign.Objective.mobile_app_installs

campaign.remote_create()
curl \
-F 'name=my campaign group' \
-F 'campaign_group_status=PAUSED' \
-F 'objective=MOBILE_APP_INSTALLS' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcampaign_groups

Step 2. Create the ad set with audience network placement and specify promoted_object to the app

use FacebookAds\Object\AdSet;
use FacebookAds\Object\Values\BidTypes;

$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$data = array(
AdSetFields::NAME => 'LifetimeBudgetSet',
AdsetFields::LIFETIME_BUDGET => 100000,
AdSetFields::END_TIME => 1380610800,
AdSetFields::BID_AMOUNT => 500,
AdSetFields::BILLING_EVENT => BillingEvents::APP_INSTALLS,
AdSetFields::OPTIMIZATION_GOAL => OptimizationGoals::APP_INSTALLS,
AdSetFields::PROMOTED_OBJECT => array(
'application_id' => <APP_ID>,
'object_store_url' => <APP_STORE_URL>,
),
AdSetFields::TARGETING => array(
'geo_locations' => array(
'countries' => array(
'US',
),
),
'page_types' => array(
'mobileexternal',
'mobilefeed',
),
'user_os' => array(
'Android',
),
),
AdSetFields::CAMPAIGN_STATUS => AdSet::STATUS_ACTIVE,
AdSetFields::CAMPAIGN_GROUP_ID => <AD_CAMPAIGN_ID>,
);
$adset->create($data);
from facebookads.objects import AdSet

adset = AdSet(parent_id='act_<AD_ACCOUNT_ID>')
data = {
AdSet.Field.name: 'LifetimeBudgetSet',
AdSet.Field.lifetime_budget: 100000,
AdSet.Field.end_time: 1380610800,
AdSet.Field.bid_amount: 500,
AdSet.Field.billing_event: AdSet.BillingEvent.app_installs,
AdSet.Field.optimization_goal: AdSet.OptimizationGoal.app_installs,
AdSet.Field.promoted_object: {
'application_id': <APP_ID>,
'object_store_url': <APP_STORE_URL>,
},
AdSet.Field.targeting: {
'geo_locations': {
'countries': ['US'],
'page_types':['mobileexternal','mobilefeed'], 
'user_os':['Android']
},
},
AdSet.Field.status: AdSet.Status.active,
AdSet.Field.campaign_group_id: <AD_CAMPAIGN_ID>,
}
adset.remote_create(params=data)
curl \
-F "name=My Adset" \
-F "lifetime_budget=100000" \
-F "end_time=1380610800" \
-F "bid_amount=150" \
-F "billing_event=APP_INSTALLS" \
-F "optimization_goal=APP_INSTALLS" \
-F "promoted_object={'application_id': <APP_ID>, 'object_store_url': <APP_STORE_URL>}" \
-F "targeting={'geo_locations': {'countries': ['US']},
'page_types':['mobileexternal','mobilefeed'], 
'user_os':['Android']}" \
-F "campaign_status=PAUSED" \
-F "campaign_group_id=<AD_CAMPAIGN_ID>" \
-F "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcampaigns"

Step 3. Create mobile app ad video creative

curl \  
-F 'object_story_spec={ \
"page_id": <PAGE_ID>, \
"video_data": {"video_id": <VIDEO_ID>,
"description": "Keeping up with friends is faster than ever.",
"image_hash": "<THUMNAIL_IMAGE_HASH>",
"call_to_action": {"type": "INSTALL_MOBILE_APP", "value": {"link": "https://play.google.com/store/apps/details?id=com.facebook.katana", "link_title": "Facebook"}}}}' \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
// use FacebookAds\Object\AdCreative;
// use FacebookAds\Object\ObjectStory\VideoData;
// use FacebookAds\Object\Fields\ObjectStory\VideoDataFields;
// use FacebookAds\Object\ObjectStorySpec;
// use FacebookAds\Object\Fields\ObjectStorySpecFields;
// use FacebookAds\Object\Fields\AdCreativeFields;

$video_data = new VideoData();
$video_data->setData(array(
VideoDataFields::DESCRIPTION => 'Keeping up with friends is faster than ever.',
VideoDataFields::IMAGE_URL => '<VIDEO_IMAGE_URL>',
VideoDataFields::VIDEO_ID => <VIDEO_ID>,
VideoDataFields::CALL_TO_ACTION => array(
'type' => 'INSTALL_MOBILE_APP',
'value' => array(
'link' => 'https://play.google.com/store/apps/details?id=com.facebook.katana',
'link_title' => 'Facebook',
),
),
));

$object_story_spec = new ObjectStorySpec();
$object_story_spec->setData(array(
ObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
ObjectStorySpecFields::VIDEO_DATA => $video_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.objects import AdCreative
from facebookads.specs import ObjectStorySpec, VideoData
video_data = VideoData()
video_data[VideoData.Field.description] = 'Keeping up with friends is faster than ever.'
video_data[VideoData.Field.video_id] = <VIDEO_ID>
video_data[VideoData.Field.image_url] = '<IMAGE_URL>'
video_data[VideoData.Field.call_to_action] = {
'type': 'INSTALL_MOBILE_APP',
'value': {
'link': 'https://play.google.com/store/apps/details?id=com.facebook.katana',
'link_title': 'Facebook',
}
}

object_story_spec = ObjectStorySpec()
object_story_spec[ObjectStorySpec.Field.page_id] = <PAGE_ID>
object_story_spec[ObjectStorySpec.Field.video_data] = video_data

creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.name] = 'Video Ad Creative'
creative[AdCreative.Field.object_story_spec] = object_story_spec
creative.remote_create()

Step 4. Create ad

use FacebookAds\Object\Ad;
use FacebookAds\Object\Fields\AdFields;

$data = array(
  AdFields::NAME => 'My Ad',
  AdFields::ADSET_ID => <AD_SET_ID>,
  AdFields::CREATIVE => array(
    'creative_id' => <CREATIVE_ID>,
  ),
);

$ad = new Ad(null, 'act_<AD_ACCOUNT_ID>');
$ad->setData($data);
$ad->create(array(
  Ad::STATUS_PARAM_NAME => Ad::STATUS_PAUSED,
));
from facebookads.adobjects.ad import Ad

ad = Ad(parent_id='act_<AD_ACCOUNT_ID>')
ad[Ad.Field.name] = 'My Ad'
ad[Ad.Field.adset_id] = <AD_SET_ID>
ad[Ad.Field.creative] = {
    'creative_id': <CREATIVE_ID>,
}
ad.remote_create(params={
    'status': Ad.Status.paused,
})
Ad ad = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAd()
  .setName("My Ad")
  .setAdsetId(<AD_SET_ID>)
  .setCreative(
    new AdCreative()
      .setFieldId(<CREATIVE_ID>)
  )
  .setStatus(Ad.EnumStatus.VALUE_PAUSED)
  .execute();
ad_account = FacebookAds::AdAccount.get('act_<AD_ACCOUNT_ID>')
ad = ad_account.ads.create({
  name: 'My Ad',
  adset_id: <ADSET_ID>,
  creative: {
    creative_id: <CREATIVE_ID>,
  },
  status: 'PAUSED',
})
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/v2.11/act_<AD_ACCOUNT_ID>/ads

For more information on Audience Network, please check out the Audience Network reference docs.


Tags: