无法访问Facebook广告系列

时间:2016-10-11 09:28:20

标签: facebook-graph-api facebook-ads-api

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

/me/adaccounts

的回应
{
  "data": [
    {
      "account_id": "123456789000001234",
      "id": "act_123456789000001234"
    }
  ],
  "paging": {
    "cursors": {
      "before": "AAAAaaaBBBBcccc",
      "after": "AAAAaaaBBBBdddd"
    }
  }
}

/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"
  }
}

请注意,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

我做错了什么?

1 个答案:

答案 0 :(得分:5)

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