Back to News for Developers

Desktop Video App Ads

April 28, 2015ByChristine Lu

Today we're introducing video functionality to desktop app ads to attract more people to install and play Facebook desktop games. Last year we launched video creative for mobile app install ads in Power Editor, and we're extending our investment in video to desktop to enable a more consistent buying experience across mobile and desktop app ads.

The video unit has similar functionality to our mobile app ads: it's eligible to play automatically in News Feed, there is a persistent call-to-action (CTA) over the video pop-up for ads rendering on the right-hand side of the page, and all videos now have an end card that appears after they finish with options to replay it or install the game.

Example of how to create a video ad:

from facebookads.objects import AdCreative
from facebookads.specs import ObjectStorySpec, VideoData

video_data = VideoData()
video_data[VideoData.Field.description] = 'Check out this app!'
video_data[VideoData.Field.video_id] = '<VIDEO_ID>'
video_data[VideoData.Field.image_url] = '<IMAGE_URL>'

call_to_action = {
'type': 'PLAY_GAME',
'value': {
'link': '<CANVAS_APP_URL>',
}
}

video_data[VideoData.Field.call_to_action] = call_to_action

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] = 'Sample Creative'
creative[AdCreative.Field.object_story_spec] = object_story_spec
creative.remote_create()
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 => 'Check out this app!',
VideoDataFields::IMAGE_URL => '<IMAGE_URL>',
VideoDataFields::VIDEO_ID => '<VIDEO_ID>',
VideoDataFields::CALL_TO_ACTION => array(
'type' => 'PLAY_GAME',
'value' => array(
'link' => '<CANVAS_APP_URL>',
)
),
));

$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();
curl \
-F 'name=Video App Ad Creative' \
-F 'object_story_spec={"page_id": <PAGE_ID>, "video_data":{"call_to_action":{"type":"PLAY_GAME", value:{"link":"<CANVAS_APP_URL>"}}, "video_id":"<VIDEO_ID>", "image_url":"<IMAGE_URL>", "description":"Check out this app!"}}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_{ad_account_id}/adcreatives

Use the creative in a campaign

from facebookads.objects import AdCampaign

campaign = AdCampaign(parent_id='act_<AD_ACCOUNT_ID>')
campaign[AdCampaign.Field.name] = 'My First Campaign'
campaign[AdCampaign.Field.status] = AdCampaign.Status.paused
campaign[AdCampaign.Field.objective] = AdCampaign.Objective.canvas_app_installs

campaign.remote_create()
use FacebookAds\Object\AdCampaign;
use FacebookAds\Object\Fields\AdCampaignFields;
use FacebookAds\Object\Values\AdObjectives;

$campaign  = new AdCampaign(null, 'act_<AD_ACCOUNT_ID>');
$campaign->setData(array(
AdCampaignFields::NAME => 'My First Campaign',
AdCampaignFields::STATUS => AdCampaign::STATUS_PAUSED,
AdCampaignFields::OBJECTIVE => AdObjectives::CANVAS_APP_INSTALLS,
));

$campaign->create();
curl \ 
-F 'name=My First Campaign' \  
-F 'campaign_group_status=PAUSED' \  
-F 'objective=CANVAS_APP_INSTALLS' \  
-F 'access_token=<AD_ACCOUNT_ID>' \  
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcampaign_groups

from facebookads.objects import AdSet

adset = AdSet(parent_id='act_<AD_ACCOUNT_ID>')
adset[AdSet.Field.name] = 'My First AdSet'
adset[AdSet.Field.status] = AdSet.Status.paused
adset[AdSet.Field.lifetime_budget] = 20000
adset[AdSet.Field.start_time] = <START_TIME>
adset[AdSet.Field.end_time] = <END_TIME>
adset[AdSet.Field.campaign_group_id] = <CAMPAIGN_GROUP_ID>
adset[AdSet.Field.bid_type] = AdSet.BidType.absolute_ocpm
adset[AdSet.Field.bid_info] = {'ACTIONS': 500}
adset[AdSet.Field.promoted_object] = {'application_id': <APP_ID>, 'object_store_url': <CANVAS_STORE_URL>},
adset[AdSet.Field.targeting] = {
'geo_locations': {
'countries': ['US'],
},
'age_min': 21,
'age_max': 35,
'interests': [{
'id': 6003107902433,
'name': 'Association football (Soccer)',
}],
'page_types': ['desktop'],
}

adset.remote_create()
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdGroupBidInfoFields;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Values\BidTypes;

$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'My First AdSet',
AdSetFields::CAMPAIGN_STATUS => AdSet::STATUS_PAUSED,
AdSetFields::LIFETIME_BUDGET => '20000',
AdSetFields::START_TIME => <START_TIME>,
AdSetFields::END_TIME => <END_TIME>,
AdSetFields::CAMPAIGN_GROUP_ID => <CAMPAIGN_GROUP_ID>,  
AdSetFields::BID_TYPE => BidTypes::BID_TYPE_ABSOLUTE_OCPM,
AdSetFields::BID_INFO => array(AdGroupBidInfoFields::ACTIONS => 500),
AdSetFields::PROMOTED_OBJECT => array(
'application_id' => <APP_ID>,
'object_store_url' => <CANVAS_STORE_URL>,
),
AdSetFields::TARGETING => array(
'geo_locations' => array(
'countries' => array('US'),
),
'age_min' => 21,
'age_max' => 35,
'interests' => array(array(
'id' => 6003107902433,
'name' => 'Association football (Soccer)',
)),
'page_types' => array('desktop'),
),
));

$adset->create();
curl \
-F "name=My First AdSet" \
-F "campaign_status=PAUSED" \
-F "lifetime_budget=20000" \
-F "start_time=<START_TIME>" \
-F "end_time=<END_TIME>" \  
-F "campaign_group_id=<CAMPAIGN_GROUP_ID>" \  
-F "bid_type=ABSOLUTE_OCPM" \  
-F "bid_info={'CLICKS':0,'REACH':0,'SOCIAL':0,'ACTIONS':500}" \
-F "promoted_object={'application_id': <APP_ID>, 'object_store_url': <APP_STORE_URL>}" \
-F "targeting={ \
'geo_locations': { \
'countries': ['US'], \
}, \
'age_min':'21', \
'age_max':'35', \
'interests':[ \
{'id':6003107902433,'name':'Association football (Soccer)'}, \
], \
'page_types' => ['desktop'], \
}" \
-F '"access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcampaigns

from facebookads.objects import AdGroup

ad = AdGroup(parent_id='act_<AD_ACCOUNT_ID>')
ad[AdGroup.Field.name] = 'My First Ad'
ad[AdGroup.Field.campaign_id] = <AD_SET_ID>
ad[AdGroup.Field.creative] = {'creative_id': <AD_CREATIVE_ID>}

ad.remote_create()
use FacebookAds\Object\AdGroup;
use FacebookAds\Object\Fields\AdGroupFields;
use FacebookAds\Object\Values\AdObjectives;

$adgroup = new AdGroup(null, 'act_<AD_ACCOUNT_ID>');
$adgroup->setData(array(
AdGroupFields::NAME => 'My First Ad',
AdGroupFields::CAMPAIGN_ID => <AD_SET_ID>,
AdGroupFields::CREATIVE => array('creative_id' => <AD_CREATIVE_ID>),
));

$adgroup->create();
curl \
-F "name=My First Ad" \
-F "campaign_id=<AD_SET_ID>" \
-F "creative={'creative_id': <AD_CREATIVE_ID>}" \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adgroups

People view more than four billion native videos on Facebook every day, and video represents the perfect format to bring games to life for new and existing players. People are uploading, sharing and discovering videos on Facebook more than ever, and for marketers, digital video helps them drive awareness, consideration and, ultimately, conversions. Couple the effectiveness of video with the success of desktop app install ads, and there's now a new way to attract and retain players.

Early adopter Plamee is excited about the initial value desktop video app ads have had on their business. Plamee's Vice President of Marketing Michael Velkes stated: "The desktop app ad unit is the best converting non-incentive ad unit available in the industry. Adding this with video is a game-changer for the quality and loyalty of players.”

For more information, check out the app ads reference.


Tags: