2016-10-11 83 views
2

我無法得到使用Facebook的圖形API我的廣告活動清單無法訪問Facebook廣告活動

響應爲/me/adaccounts

{ 
    "data": [ 
    { 
     "account_id": "1234567890000", 
     "id": "act_1234567890000" 
    } 
    ], 
    "paging": { 
    "cursors": { 
     "before": "AAAAaaaBBBBcccc", 
     "after": "AAAAaaaBBBBdddd" 
    } 
    } 
} 

/1234567890000/campaigns回報

{ 
    "error": { 
    "message": "Unsupported get request. Object with ID '1234567890000' 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

我在做什麼錯?

回答

3

不得不使用id: act_1234567890000而不是account_id: 1234567890000所以請求變成/act_1234567890000/campaigns。還必須創建Facebook應用,添加Marketing API並分配給該廣告帳戶,然後通過應用創建令牌,而不是從業務管理器創建令牌。

+0

即使使用npm模塊「facebook-ads-sdk」,情況也是如此。將「act_」添加到帳戶ID解決了我的問題! – cpres

相關問題