首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在目标规范参数中包含'conversion_specs‘参数或'user_os’字段会导致错误

在目标规范参数中包含'conversion_specs‘参数或'user_os’字段会导致错误
EN

Stack Overflow用户
提问于 2014-07-12 09:46:33
回答 1查看 535关注 0票数 1

我的问题是关于Facebook Ads API和广告组创建中参数targeting中的字段'user_os','user_device‘,以及'conversion_specs’。

我可以成功地制作一个广告组,但一个非常简单的客观的网站点击量和其他参数的最低限度。我正在尝试创建一个移动应用程序安装广告。

我的参数:

代码语言:javascript
运行
复制
"access_token": <access_token>
"campaign_id": <set_id>,
"creative": {"creative_id": <creative_id>},
"objective": 'MOBILE_APP_INSTALLS',
"bid_type": 'CPM',
"bid_info": {"IMPRESSIONS": 3},
"conversion_specs": {
"action.type": 'mobile_app_install',
    "application": <app_id>
},
"tracking_specs": {
    "action.type": 'mobile_app_install',
    "application": <app_id>
},
"targeting": {
    "user_os": 'iOS',
    "user_device": 'iPhone'
    "custom_audiences": [{'id': <custom_audience_id>}]
},
"name": "noNameProvided",
"adgroup_status": 'PAUSED'

<app_id>是我的Facebook应用程序ID,它指向Facebook移动应用程序本身的iTunes商店ID,因为我只是在测试,没有自己的移动应用程序。

当包含"user_os“和"user_device”,或者包含"conversion_specs“时,我会得到

{'error': {'message': 'An unknown error has occurred.', 'code': 1, 'type': 'OAuthException'}}

当我排除"user_os“、"user_device”和"conversion_specs“时,我得到

代码语言:javascript
运行
复制
{'error': {'code': 1487504, 'message': "Please include a value for 'user_os' or 'user_device' in ad targeting spec.", 'is_transient': False, 'type': 'Exception'}}

你能理解为什么会这样吗?"conversion_specs“和目标字段"user_os”和"user_device“似乎是破坏这个广告组创建的东西,但我不知道我用它们做错了什么。

编辑-我使用的创意参数如下所示:

代码语言:javascript
运行
复制
"object_store_url": "https://itunes.apple.com/us/app/id284882215",
"image_hash": <img_hash>, # 1200 x 627 .jpg
"name": "install_c",
"body": "installing is good",
"call_to_action_type": "LISTEN_MUSIC",
"actor_name": "alphadtrib"
"actor_image_hash": <another_img_hash> # 75 x 75 .jpg
EN

回答 1

Stack Overflow用户

发布于 2014-07-17 11:37:15

根据https://developers.facebook.com/docs/reference/ads-api/mobile-app-ads的说法

代码语言:javascript
运行
复制
For mobile ads, when using the creative ID in the ad group you must specify 
a tracking and conversion spec explicitly using the Facebook App ID. To obtain 
an app ID, register the app on Facebook.

当你使用itunes商店ID时,这可能会破坏它

编辑:

好的,我试着使用您发布的规范,user_device和user_os需要是数组,而不是字符串:)当我将它们更改为数组时,它适用于我

EDIT2:

你的创意也是错的。根据developers.facebook.com/docs/reference/ads-api/mobile-app-ads的说法,你必须通过向graph.facebook.com{page_id}/feed发送带有字段的请求来创建一个未发布的页面帖子:

消息、call_to_action、图片

然后,创建一个有创意的、传递的object_story_id:

代码语言:javascript
运行
复制
// create the ad creative first 
curl \ 
-F "object_story_id=1776318_101523207386" \ 
-F "access_token=_____" \ 
graph.facebook.com/act_{ad_account_id}/adcreatives
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24708837

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档