我想集成facebook Audience sdk。文档很难解决。我被困在一个地方
FacebookAdsApi.init(app_id=APP_ID,app_secret=APP_SECRET,access_token=ACCES
_TOKEN)
ad_account = AdAccount(fbid=FACEBOOK_ID)
params = {
CustomAudience.Field.subtype: CustomAudience.Subtype.custom,
CustomAudience.Field.name: 'My new CA',
CustomAudience.Field.description: 'People who bought on my website',
}
audience = ad_account.create_custom_audience(params=params)
当我在 python 上发送请求时,我会收到底部警告。但我确信我的 fbid 是真的我获得了必要的权限,但情况仍然相同
Status: 400
Response:
{
"error": {
"fbtrace_id": "HyhfMfSiw3S",
"type": "GraphMethodException",
"message": "Unsupported post request. Object with ID 'act_xxxxxxxx' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"error_subcode": 33,
"code": 100
}
}
您需要确保您使用的应用程序访问令牌应该有权访问您的 Facebook 广告项目。