早些时候,我有了Facebook的个人广告账户,在https://developers.facebook.com/docs/marketing-api/reference/custom-audience的帮助下,我用来创建自定义受众。现在我已经转移到业务帐户,并尝试调用相同的创建自定义受众代码,它给我以下错误。
未捕获异常'FacebookAds\Http\Exception\AuthorizationException‘,消息为'(#803)您请求的某些别名不存在: createAudiences
是否需要将marketing API更改为Business Mapping API,或者当前代码中存在错误?
我正在使用下面的代码
$audience = new CustomAudience(null, $accountId);
$audience->setData(array(
CustomAudienceFields::NAME => $associative_arr['name'],
CustomAudienceFields::PIXEL_ID => $associative_arr['pixelId'],
CustomAudienceFields::DESCRIPTION => $associative_arr['description'],
CustomAudienceFields::RETENTION_DAYS => $associative_arr['retensionDays'],
CustomAudienceFields::SUBTYPE => CustomAudienceSubtypes::WEBSITE,
CustomAudienceFields::RULE => array('url' => array('i_contains' => $associative_arr['websiteUrl'])),
CustomAudienceFields::PREFILL => $associative_arr['prefill']
));
// Create the audience
$audience->create();有什么建议吗?
发布于 2017-05-17 06:05:19
假设$accountId的格式为act_<AD_ACCOUNT_ID>
$audience = new CustomAudience(null, $accountId);您似乎没有在此广告帐户中创建访问者的权限,请尝试在此处调试您的访问令牌:https://developers.facebook.com/tools/debug/accesstoken
https://stackoverflow.com/questions/40018379
复制相似问题