本文件介紹各種專為推動桌面和流動應用程式安裝次數和互動而設的廣告單位。
您應將此類廣告單位用於推動用戶前往您的桌面版應用程式或流動應用程式,讓他們安裝應用程式或與相片、影片、輪播廣告或試玩廣告創意互動。
理論上,此類廣告單位適用於以下廣告:
相片 | 影片 | 輪播 | 試玩 | |
---|---|---|---|---|
流動應用程式安裝廣告 | ✓ | ✓ | ✓ | ✓ |
流動應用程式互動廣告 | ✓ | ✓ | ✓ | |
桌面版安裝廣告 | ✓ | ✓ | ✓ | |
桌面版互動廣告 | ✓ | ✓ | ✓ | |
宣傳虛擬商品的桌面版應用程式廣告 | ✓ | ✓ | ✓ |
宣傳虛擬商品的桌面版應用程式廣告是桌面版互動廣告的一種,您可以使用虛擬商品的優惠來重新吸引玩家再次使用應用程式。例如,應用程式可以在動態消息中提供項目折扣或一組應用程式內貨幣,以重新吸引舊有玩家。請參閱此處,取得如何將應用程式設為接受付款的指示。
以下為流動版安裝廣告圖像單位的例子,供您參考:
附有圖像的虛擬商品桌面版應用程式廣告則如下圖所示:
建立廣告時,請注意以下要求:
device_platforms
必須為 desktop
。如果您不希望廣告出現在 Facebook 桌面版動態消息和右欄,您也可以指定 facebook_positions
。GET_OFFER
,則必須為價格加上折扣。詳情請參閱虛擬商品。以下額外呼籲字句適用於應用程式廣告,可在帖子的 call_to_action
欄位或廣告創意的 object_story_spec
中使用。您也可以在 app_link
欄位中指定流動應用程式的深層連結,或者在 product_link
欄位中指定桌面版應用程式的虛擬商品物件。
鍵 | 值 | 必填欄位 |
---|---|---|
type | 流動版廣告的呼籲字句類型(包括安裝廣告和互動廣告): | 是 |
value | 以下項目的 JSON 字典: | 是
|
value.link | 指 App Store、Google Play 商店或 Facebook 全螢幕展示廣告應用程式網址,例如 https://itunes.apple.com/us/app/facebook/id284882215 | 是 |
value.app_link | 用於定義僅適用於流動應用程式的深層連結目的地,例如 | 是,僅限流動版安裝或互動廣告 |
value.product_link | 用於定義網址,該網址會指向產品的開放式圖表虛擬商品物件。請參閱此處了解設定詳情。 | 是,僅限桌面版虛擬商品 |
value.link_title | 讓您自訂連結名稱,該名稱會顯示於廣告圖像之下 | 否 |
如要建立附有相片的桌面版或流動應用程式廣告,請先使用廣告創意的 object_story_spec: {'link_data': ...}
欄位來建立附有相片的連結專頁帖子。
範例:
curl -X POST \
-F 'name="Sample Creative"' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"link_data": {
"call_to_action": {
"type": "INSTALL_MOBILE_APP",
"value": {
"link": "<APP_STORE_URL>"
}
},
"image_hash": "<IMAGE_HASH>",
"link": "<APP_STORE_URL>",
"message": "Try it out"
}
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives
或者,您也可以透過專頁的動態消息端點建立專頁帖子,然後使用廣告創意中的帖子編號。請參閱以下範例部分,查看更多範例。
如要使用輪播廣告格式建立流動應用程式安裝廣告或互動廣告,請按輪播廣告文件中的指示操作,但要在每個 child_attachments
的 link
欄位中指定應用程式商店連結。
請注意,您應在每個 child_attachment
中指定相同的應用程式商店連結。您不必在 call_to_action:{'value':{'link':... }}}
中再次指定該連結
curl -X POST \
-F 'name="Carousel app ad"' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"link_data": {
"message": "My message",
"link": "http://www.example.com/appstoreurl",
"caption": "WWW.ITUNES.COM",
"name": "The link name",
"description": "The link description",
"child_attachments": [
{
"link": "http://www.example.com/appstoreurl",
"image_hash": "<IMAGE_HASH>",
"call_to_action": {
"type": "USE_MOBILE_APP",
"value": {
"app_link": "<DEEP_LINK>"
}
}
},
{
"link": "http://www.example.com/appstoreurl",
"image_hash": "<IMAGE_HASH>",
"call_to_action": {
"type": "USE_MOBILE_APP",
"value": {
"app_link": "<DEEP_LINK>"
}
}
},
{
"link": "http://www.example.com/appstoreurl",
"image_hash": "<IMAGE_HASH>",
"call_to_action": {
"type": "USE_MOBILE_APP",
"value": {
"app_link": "<DEEP_LINK>"
}
}
},
{
"link": "http://www.example.com/appstoreurl",
"image_hash": "<IMAGE_HASH>",
"call_to_action": {
"type": "USE_MOBILE_APP",
"value": {
"app_link": "<DEEP_LINK>"
}
}
}
],
"multi_share_optimized": true
}
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives
如要建立附有影片的應用程式廣告,請先上載影片至廣告帳戶的影片庫。然後使用廣告創意object_story_spec: {'video_data':...}
欄位的影片編號。
範例:
use FacebookAds\Object\AdCreative;
use FacebookAds\Object\AdCreativeVideoData;
use FacebookAds\Object\Fields\AdCreativeVideoDataFields;
use FacebookAds\Object\AdCreativeObjectStorySpec;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\Fields\AdCreativeFields;
$video_data = new AdCreativeVideoData();
$video_data->setData(array(
AdCreativeVideoDataFields::IMAGE_URL => '<THUMBNAIL_URL>',
AdCreativeVideoDataFields::VIDEO_ID => <VIDEO_ID>,
AdCreativeVideoDataFields::CALL_TO_ACTION => array(
'type' => 'INSTALL_MOBILE_APP',
'value' => array(
'link' => '<APP_STORE_URL>',
),
),
));
$object_story_spec = new AdCreativeObjectStorySpec();
$object_story_spec->setData(array(
AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
AdCreativeObjectStorySpecFields::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.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativeobjectstoryspec \
import AdCreativeObjectStorySpec
from facebookads.adobjects.adcreativevideodata \
import AdCreativeVideoData
video_data = AdCreativeVideoData()
video_data[AdCreativeVideoData.Field.description] = 'try it out'
video_data[AdCreativeVideoData.Field.video_id] = <VIDEO_ID>
video_data[AdCreativeVideoData.Field.image_url] = '<THUMBNAIL_URL>'
video_data[AdCreativeVideoData.Field.call_to_action] = {
'type': 'INSTALL_MOBILE_APP',
'value': {
'link': '<APP_STORE_URL>',
'link_title': 'Facebook',
},
}
object_story_spec = AdCreativeObjectStorySpec()
object_story_spec[AdCreativeObjectStorySpec.Field.page_id] = <PAGE_ID>
object_story_spec[AdCreativeObjectStorySpec.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()
AdCreative adCreative = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdCreative()
.setName("Sample Creative")
.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>)
)
)
.setFieldLinkDescription("try it out")
.setFieldImageUrl(<THUMBNAIL_URL>)
.setFieldVideoId(<VIDEO_ID>)
)
)
.execute();
String ad_creative_id = adCreative.getId();
curl \
-F 'name=Sample Creative' \
-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
如要檢索有關專頁帖子的詳情,請參閱連結專頁帖子文件或影片專頁帖子文件。
您可以透過專頁的 /promotable_posts
關係連線列出所有專頁帖子。
curl https://graph.facebook.com/{API_VERSION}/{PAGE_ID}/promotable_posts
如要檢索有關廣告創意的詳情,請參閱廣告創意文件。
ADVERTISE
任務的用戶所要求"call_to_action={'type':'LEARN_MORE', 'value':{'link':'https://itunes.apple.com/us/app/facebook/id284882215', 'app_link':'facebook://path/to/page'}}"
指定應用程式連結之前,您應驗證是否已抓取連結,方法是執行以下呼叫:
https://graph.facebook.com/{API_VERSION}/?type=og&scrape=true&id={APP_LINK}
Meta 會提供彙整的每日洞察報告,讓您了解安裝應用程式的用戶之人口統計資料。如要檢索此洞察報告,您應使用應用程式存取憑證並查詢。
https://graph.facebook.com/{API_VERSION}/{APP_ID}/insights/application_mobile_app_installs?&access_token={ACCESS_TOKEN}
您也可以指定額外的網址參數 breakdown
來細分統計資料,而此參數可以是以下任何一個值。目前您無法合併資料細節。
名稱 | 說明 |
---|---|
| 按廣告受眾的年齡和性別細分統計資料 |
| 按廣告受眾的國家/地區細分統計資料 |
| 按廣告受眾的地區設定細分統計資料 |
範例:
https://graph.facebook.com/{API_VERSION}/{APP_ID}/insights/application_mobile_app_installs?breakdown=gender_age&access_token={ACCESS_TOKEN} https://graph.facebook.com/{API_VERSION}/{APP_ID}/insights/application_mobile_app_installs?breakdown=country&access_token={ACCESS_TOKEN} https://graph.facebook.com/{API_VERSION}/{APP_ID}/insights/application_mobile_app_installs?breakdown=locale&access_token={ACCESS_TOKEN}
第 1 步:使用圖像建立專頁帖子。請注意,您應使用 PAGE_ACCESS_TOKEN
和專頁 API 連線階段來建立專頁帖子。
use FacebookAds\Api;
use FacebookAds\Http\RequestInterface;
$params = array(
'message' => 'Sign up today',
'picture' => '<IMAGE_URL>',
'link' => '<LINK>',
'published' => 1,
'call_to_action' => array(
'type' => 'SIGN_UP',
'value' => array(
'link' => '<LINK>',
),
),
);
$data = Api::instance()->call(
'/'.<PAGE_ID>.'/feed',
RequestInterface::METHOD_POST,
$params)->getContent();
from facebookads import FacebookAdsApi
params = {
'massage': 'Sign up today.',
'picture': '<IMAGE_URL>',
'link': '<LINK>',
'published': 1,
'call_to_action': {
'type': 'SIGN_UP',
'value': {
'link': '<LINK>',
},
},
}
data = FacebookAdsApi.get_default_api().\
call('POST', (<PAGE_ID>, 'feed'), params=params)
curl \
-F 'message=Sign up today' \
-F 'picture=<IMAGE_URL>' \
-F 'link=<LINK>' \
-F 'published=1' \
-F 'call_to_action={"type":"SIGN_UP","value":{"link":"<LINK>"}}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/<PAGE_ID>/feed
第 2 步:建立廣告創意(以 '{PAGE_ID}_{POST_ID}'
形式呈現 {STORY_ID}
)
curl -X 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
第 3 步:在廣告中使用廣告創意
curl -X POST \
-F 'name="My AdGroup with Redownload"' \
-F 'adset_id="<AD_SET_ID>"' \
-F 'creative={
"creative_id": "<CREATIVE_ID>"
}' \
-F 'redownload=1' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/ads
第 1 步:使用圖像建立專頁帖子。請注意,您應使用 PAGE_ACCESS_TOKEN
和專頁 API 連線階段來建立專頁帖子。
curl -X POST \
-F 'message="This is a test message"' \
-F 'call_to_action={
"type": "BUY_NOW",
"value": {
"link": "{app-store-url}",
"app_link": "{deep-link}"
}
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/{page-id}/feed
第 2 步:建立廣告創意
curl -X 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
第 3 步:在廣告組合設定出價,以點擊次數為優化目標,按展示次數付款。
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Values\AdSetBillingEventValues;
use FacebookAds\Object\Values\AdSetOptimizationGoalValues;
use FacebookAds\Object\Fields\TargetingFields;
use FacebookAds\Object\Targeting;
$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'LifetimeBudgetSet',
AdsetFields::LIFETIME_BUDGET => 100000,
AdSetFields::BID_AMOUNT => 500,
AdSetFields::BILLING_EVENT => AdSetBillingEventValues::IMPRESSIONS,
AdSetFields::OPTIMIZATION_GOAL => AdSetOptimizationGoalValues::LINK_CLICKS,
AdSetFields::PROMOTED_OBJECT => array(
'application_id' => <APP_ID>,
'object_store_url' => '<APP_STORE_URL>',
),
AdSetFields::TARGETING => (new Targeting())->setData(array(
TargetingFields::GEO_LOCATIONS => array(
'countries' => array('US'),
),
TargetingFields::USER_OS => array(
'IOS',
),
TargetingFields::PUBLISHER_PLATFORMS => array(
'facebook',
'audience_network',
),
TargetingFields::FACEBOOK_POSITIONS => array('feed'),
)),
AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
AdSetFields::END_TIME =>
(new \DateTime("+1 week"))->format(\DateTime::ISO8601),
));
$adset->create(array(
AdSet::STATUS_PARAM_NAME => AdSet::STATUS_PAUSED,
));
import time
from facebookads.adobjects.adset import AdSet
adset = AdSet(parent_id='act_<AD_ACCOUNT_ID>')
adset.update({
AdSet.Field.name: 'LifetimeBudgetSet',
AdSet.Field.campaign_id: <CAMPAIGN_ID>,
AdSet.Field.lifetime_budget: 10000,
AdSet.Field.start_time: int(time.time()),
AdSet.Field.end_time: int(time.time() + 100000),
AdSet.Field.optimization_goal: AdSet.OptimizationGoal.link_clicks,
AdSet.Field.billing_event: AdSet.BillingEvent.impressions,
AdSet.Field.bid_amount: 500,
AdSet.Field.promoted_object: {
'application_id': <APP_ID>,
'object_store_url': '<APP_STORE_URL>',
},
AdSet.Field.targeting: {
'geo_locations': {
'countries': ['US'],
},
'user_os': ['iOS'],
Targeting.Field.publisher_platforms: ['facebook', 'audience_network'],
Targeting.Field.facebook_positions: ['feed'],
},
})
adset.remote_create(params={
'status': AdSet.Status.paused,
})
curl \
-F 'name=LifetimeBudgetSet' \
-F 'lifetime_budget=100000' \
-F 'bid_amount=500' \
-F 'billing_event=IMPRESSIONS' \
-F 'optimization_goal=LINK_CLICKS' \
-F 'promoted_object={"application_id":"<APP_ID>","object_store_url":"<APP_STORE_URL>"}' \
-F 'targeting={
"facebook_positions": ["feed"],
"geo_locations": {"countries":["US"]},
"publisher_platforms": ["facebook","audience_network"],
"user_os": ["IOS"]
}' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'end_time=2018-02-06T04:45:30+0000' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adsets
第 4 步:在廣告中使用廣告創意
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(
'redownload' => 1,
));
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[Ad.Field.redownload] = True
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>)
)
.setRedownload(true)
.execute();
String ad_id = ad.getId();
curl \
-F 'name=My Ad' \
-F 'adset_id=<AD_SET_ID>' \
-F 'creative={"creative_id":"<CREATIVE_ID>"}' \
-F 'redownload=1' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/ads
第 1 步:使用圖像建立專頁帖子。請注意,您應使用 PAGE_ACCESS_TOKEN
和專頁 API 連線階段來建立專頁帖子。
use FacebookAds\Api;
use FacebookAds\Http\RequestInterface;
$params = array(
'message' => 'Check out this App today. Available on iTunes.',
'published' => 1,
'link' => '<APP_STORE_URL>',
'picture' => '<IMAGE_URL>',
'call_to_action' => array(
'type' => 'LEARN_MORE',
'value' => array(
'link' => '<APP_STORE_URL>',
'app_link' => '<APP_DEEP_LINK>',
),
),
);
$data = Api::instance()->call(
'/'.<PAGE_ID>.'/feed',
RequestInterface::METHOD_POST,
$params)->getContent();
from facebookads import FacebookAdsApi
params = {
'massage': 'Check out this App today. Available on iTunes.',
'picture': '<IMAGE_URL>',
'link': '<APP_STORE_URL>',
'published': 1,
'call_to_action': {
'type': 'LEARN_MORE',
'value': {
'link': '<APP_STORE_URL>',
'app_link': '<APP_DEEP_LINK>',
},
},
}
path = "/{}/feed".format(<PAGE_ID>)
data = FacebookAdsApi.get_default_api().call('POST', (path,), params=params)
curl \
-F 'message=Check out this App today. Available on iTunes.' \
-F 'published=1' \
-F 'link=<APP_STORE_URL>' \
-F 'picture=<IMAGE_URL>' \
-F 'call_to_action={
"type": "LEARN_MORE",
"value": {"link":"<APP_STORE_URL>","app_link":"<APP_DEEP_LINK>"}
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/<PAGE_ID>/feed
第 2 步:建立廣告創意
curl -X 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
第 3 步:在廣告組合設定出價,以應用程式事件為優化目標,按展示次數付款。
請注意,您也必須設定廣告組合的 promoted_object
,來加入 custom_event_type
以作進一步優化。詳見廣告組合文件。
curl -X POST \
-F 'name="A CPA Ad Set optimized for App Events"' \
-F 'campaign_id="<AD_CAMPAIGN_ID>"' \
-F 'daily_budget=300' \
-F 'start_time="2024-11-28T11:42:05-0800"' \
-F 'end_time="2024-12-05T11:42:05-0800"' \
-F 'billing_event="IMPRESSIONS"' \
-F 'optimization_goal="OFFSITE_CONVERSIONS"' \
-F 'bid_amount=100' \
-F 'status="PAUSED"' \
-F 'promoted_object={
"application_id": "<APP_ID>",
"object_store_url": "<APP_STORE_URL>",
"custom_event_type": "PURCHASE"
}' \
-F 'targeting={
"facebook_positions": [
"feed"
],
"geo_locations": {
"countries": [
"US"
]
},
"user_os": [
"iOS"
]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/adsets
第 4 步:在廣告中使用廣告創意
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(
'redownload' => 1,
));
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[Ad.Field.redownload] = True
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>)
)
.setRedownload(true)
.execute();
String ad_id = ad.getId();
curl \
-F 'name=My Ad' \
-F 'adset_id=<AD_SET_ID>' \
-F 'creative={"creative_id":"<CREATIVE_ID>"}' \
-F 'redownload=1' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/ads
請注意,您應使用 PAGE_ACCESS_TOKEN
和專頁 API 連線階段來建立專頁帖子。
curl \
-F 'name=My Video' \
-F 'message=Check out this app!' \
-F 'thumbnail=<APP_STORE_URL>' \
-F 'published=0' \
-F 'call_to_action={"type":"INSTALL_MOBILE_APP","value":{"link":"<APP_STORE_URL>"}}' \
-F 'source=@<VIDEO_PATH>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/<PAGE_ID>/videos
curl \
-F 'name=My Video' \
-F 'message=Check out this app!' \
-F 'thumbnail=<APP_STORE_URL>' \
-F 'published=0' \
-F 'call_to_action={
"type": "LEARN_MORE",
"value": {"link":"<APP_STORE_URL>","app_link":"<APP_DEEP_LINK>"}
}' \
-F 'source=@<VIDEO_PATH>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/<PAGE_ID>/videos
curl \
-F 'name=My Video' \
-F 'message=Check out this app!' \
-F 'thumbnail=<THUMBNAIL_PATH>' \
-F 'published=0' \
-F 'call_to_action={"type":"PLAY_GAME","value":{"link":"<THUMBNAIL_PATH>"}}' \
-F 'source=@<VIDEO_PATH>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/<PAGE_ID>/videos
curl \
-F 'message=Buy coins now!' \
-F 'picture=<IMAGE_URL>' \
-F 'link=<LINK>' \
-F 'published=1' \
-F 'call_to_action={"type":"BUY_NOW","value":{"link":"<LINK>","product_link":"<PRODUCT_LINK>"}}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/<PAGE_ID>/feed
curl \
-F 'name=My Video' \
-F 'message=Buy coins now!' \
-F 'thumbnail=<THUMBNAIL_PATH>' \
-F 'published=0' \
-F 'call_to_action={
"type": "BUY_NOW",
"value": {"link":"<THUMBNAIL_PATH>","product_link":"<THUMBNAIL_PATH>"}
}' \
-F 'source=@<VIDEO_PATH>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/<PAGE_ID>/videos
進階高效速成目錄廣告可以推動更多用戶安裝您的流動應用程式。這讓您可以根據用戶的行為,透過流動版安裝廣告來再次鎖定用戶。
第 1 步:為商品目錄建立宣傳活動
curl -X POST \
-F 'name="App Installs Campaign with Dynamic Product Ads"' \
-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
第 2 步:根據上述商品目錄,為特定商品組合建立廣告組合
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Fields\TargetingFields;
use FacebookAds\Object\Values\AdSetBillingEventValues;
use FacebookAds\Object\Values\AdSetOptimizationGoalValues;
$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'Mobile App Installs Ad Set with Dynamic Product Ads',
AdSetFields::BID_AMOUNT => 3000,
AdSetFields::BILLING_EVENT => AdSetBillingEventValues::IMPRESSIONS,
AdSetFields::OPTIMIZATION_GOAL => AdSetOptimizationGoalValues::APP_INSTALLS,
AdSetFields::DAILY_BUDGET => 15000,
AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
AdSetFields::TARGETING => 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',
),
TargetingFields::DYNAMIC_AUDIENCE_IDS => array(<PRODUCT_AUDIENCE_ID>),
),
AdSetFields::PROMOTED_OBJECT => array(
'product_set_id' => <PRODUCT_SET_ID>,
'application_id' => <APP_ID>,
'object_store_url' => '<APP_STORE_URL>',
),
));
$adset->create(array(
AdSet::STATUS_PARAM_NAME => AdSet::STATUS_PAUSED,
));
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 with Dynamic Product Ads',
AdSet.Field.promoted_object: {
'product_set_id': product_set_id,
'application_id': <APP_ID>,
'object_store_url': '<APP_STORE_URL>',
},
AdSet.Field.campaign_id: <CAMPAIGN_ID>,
AdSet.Field.daily_budget: 15000,
AdSet.Field.optimization_goal: AdSet.OptimizationGoal.app_installs,
AdSet.Field.billing_event: AdSet.BillingEvent.impressions,
AdSet.Field.bid_amount: 3000,
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',
],
Targeting.Field.dynamic_audience_ids: [
<PRODUCT_AUDIENCE_ID>,
],
},
})
adset.remote_create(params={
'status': AdSet.Status.paused,
})
curl \
-F 'name=Mobile App Installs Ad Set with Dynamic Product Ads' \
-F 'bid_amount=3000' \
-F 'billing_event=IMPRESSIONS' \
-F 'optimization_goal=APP_INSTALLS' \
-F 'daily_budget=15000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"geo_locations": {"countries":["US"]},
"publisher_platforms": ["facebook","audience_network"],
"device_platforms": ["mobile"],
"user_os": ["IOS"],
"dynamic_audience_ids": ["<PRODUCT_AUDIENCE_ID>"]
}' \
-F 'promoted_object={
"product_set_id": "<PRODUCT_SET_ID>",
"application_id": "<APP_ID>",
"object_store_url": "<APP_STORE_URL>"
}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.8/act_<AD_ACCOUNT_ID>/adsets
第 3 步:使用範本來建立進階高效速成目錄廣告的廣告創意
curl -X POST \
-F 'name="Advantage+ catalog ads template creative sample"' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"call_to_action": {
"type": "INSTALL_MOBILE_APP",
"value": {
"link": "http://www.example.com/appstoreurl"
}
},
"message": "Test {{product.name | titleize}}",
"link": "http://www.example.com/appstoreurl",
"name": "Headline {{product.price}}",
"description": "Description {{product.description}}"
}
}' \
-F 'product_set_id="<PRODUCT_SET_ID>"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives
第 4 步:在廣告中使用以上的廣告創意
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(
'redownload' => 1,
));
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[Ad.Field.redownload] = True
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>)
)
.setRedownload(true)
.execute();
String ad_id = ad.getId();
curl \
-F 'name=My Ad' \
-F 'adset_id=<AD_SET_ID>' \
-F 'creative={"creative_id":"<CREATIVE_ID>"}' \
-F 'redownload=1' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/ads
curl \ -X POST \ -F "name=<name>" \ -F "source=<>" \ -F "access_token=<access_token>" \ "https://graph.facebook.com/<API_VERSION>/act_<account_id>/adplayables"
name
:用於區分廣告素材與廣告帳戶中其他試玩廣告的名稱,例如 {ad_name}
-> {playable_asset_name}
source
:檔案在本機裝置上的絕對路徑access_token
:可從 Graph API 測試工具產生您可以在試玩 HTML 5 檔案中加入兩個中繼資料標籤。如此一來,Meta 便可以將廣告中的試玩檔案歸因於您的應用程式。
... <head> ... <meta name="ref-application-id" content="<YOUR_APP_ID>"> <meta name="ref-asset-id" content="<YOUR_ASSET_ID>"> ... </head> ...
curl \ -F 'name=Sample Creative' \ -F 'object_story_spec={ "page_id": "<PAGE_ID>", "video_data": { "call_to_action": {"type":"INSTALL_MOBILE_APP","value":{"application":<APP_ID>,"link":"<APP_STORE_URL>"}}, "image_url": "<THUMBNAIL_URL>", "link_description": "try it out", "video_id": "<VIDEO_ID>" } }' \ -F 'playable_asset_id=<PLAYABLE_ASSET_ID>' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
curl \ -F 'name=My Ad' \ -F 'status=ACTIVE' \ -F 'adset_id=<AD_SET_ID>' \ -F 'creative={"creative_id":"<CREATIVE_ID>"}' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads