facebook - FB 营销 API 更新广告素材时出错
问题描述
我正在使用 Facebook 营销 API 来更新广告,但我遇到了错误。
{"error":{"message":"无效参数","type":"OAuthException","code":100,"error_subcode":1815573,"is_transient":false,"error_user_title":"更新失败creative","error_user_msg":"未能更新广告素材 6,060,290,455,919。请指定名称、状态或关联的广告标签以更新广告素材。","fbtrace_id":"AZj1cjgCsX7DcTVUvMLJCo-"}}
我的代码是:
try{
$object_story_spec = new AdCreativeObjectStorySpec();
$object_story_spec->setData(array(
AdCreativeObjectStorySpecFields::PAGE_ID => '<page_id>',
AdCreativeObjectStorySpecFields::LINK_DATA => $link_data,
));
$creative = new AdCreative("<adcreativeid>");
$creative->setData(array(
AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec
));
$creative->updateSelf();
}catch (\FacebookAds\Http\Exception\AuthorizationException $e) {
print_r($e->getResponse()->getBody());
}
解决方案
推荐阅读
- javascript - 在 Vue.js 中选择不显示选项
- android - 编号选择器在 Recyclerview 中不起作用
- google-sheets - 修改脚本以在每次进行编辑时将数据验证从列表和编辑该数据验证的时间戳复制到新行
- html - 如何从谷歌地图中抓取地址信息?
- sql - 将获取/创建存储过程从一项推广到多项
- c# - C# Windows Forms Spotify API 用户授权
- php - 数组迭代中的 stdClass 对象
- google-cloud-platform - 如何在 BigQuery 中按结构分组?
- ibm-cloud - 通过 HTTP 调用 IBM Function
- laravel - laravel 5.7 重定向到同一页面到一个部分 ID