无法访问Facebook广告系列

Jan*_*mer 4 facebook-graph-api facebook-ads-api

我无法使用Facebook Graph API获取我的广告系列列表

回应 /me/adaccounts

{
  "data": [
    {
      "account_id": "123456789000001234",
      "id": "act_123456789000001234"
    }
  ],
  "paging": {
    "cursors": {
      "before": "AAAAaaaBBBBcccc",
      "after": "AAAAaaaBBBBdddd"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

/123456789000001234/campaigns 退货

{
  "error": {
    "message": "Unsupported get request. Object with ID '123456789000001234' 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",
    "type": "GraphMethodException",
    "code": 100,
    "fbtrace_id": "EilRrOk1CEb"
  }
}
Run Code Online (Sandbox Code Playgroud)

请注意,id已更改为虚拟值。

令牌用于系统用户,并且广告帐户已分配给该用户(角色:admin)。令牌包含以下范围:read_page_mailboxes, rsvp_event, ads_management, ads_read, read_insights, manage_pages, publish_pages, pages_show_list, pages_manage_cta, pages_manage_instant_articles, business_management, publish_actions

我究竟做错了什么?

Jan*_*mer 6

必须使用id: act_123456789000001234而不是,account_id: 123456789000001234因此请求变为/act_123456789000001234/campaigns。还必须创建一个Facebook应用程序,添加Marketing API并为其分配一个广告帐户,然后通过该应用程序创建令牌,而不是从业务管理器中创建令牌。