You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Facebook Business SDK调用Marketing API时遇#100权限缺失错误

Facebook Ads API调用get_campaigns时提示缺少权限(已配置所需权限)

我创建了一个具备所需权限的Facebook应用,用于读取全部广告活动数据(权限截图:权限截图)。

我的代码片段如下:

def get_facebook_campaign_data(app_id,app_secret,access_token,account_id,s_date,e_date):
 
    # try:
        FacebookAdsApi.init(app_id, app_secret, access_token)
        account = AdAccount("act_"+account_id)
        print(account)
        # res = account.remote_read(fields=[
        # AdAccount.Field.name,
        # ])
        # print(res)

# Print out account name.
        campaigns = account.get_campaigns(fields=['id','name','account_id'])
        print("Total number of Campaigns :",len(campaigns))

尽管已配置所需权限,但调用get_campaigns方法时仍出现如下权限错误:

facebook_business.exceptions.FacebookRequestError:
 Message: Call was not successful
  Method:  GET
  Path:    https://graph.facebook.com/v17.0/act_1107996893942456/campaigns
  Params:  {'fields': 'id,name,account_id', 'summary': 'true'}

  Status:  400
  Response:
    {
      "error": {
        "message": "(#100) Missing permissions",
        "type": "OAuthException",
        "code": 100,
        "fbtrace_id": "AN_NKUR8AkpLLm1kKxzibJI"
      }
    }

恳请各位提供帮助,任何线索都将万分感谢!

内容的提问来源于stack exchange,提问作者iamabhaykmr

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 02:42:12