首页 文章

Facebook营销api访问非现有领域

提问于
浏览
2

我正在尝试访问Facebook帐户的广告系列 . 使用python lib:https://github.com/facebook/facebook-python-ads-sdk

收到错误: (#100) Tried accessing nonexisting field (campaigns) on node type (AdAccount)

网址: https://graph.facebook.com/v2.11/{account_id}/campaigns

一切都运作好几个月 . 现在,即使这个网址的Facebook页面也是空的:https://developers.facebook.com/docs/marketing-api/reference/ad-account/campaigns/

有什么想法,有什么问题?

2 回答

  • 1

    似乎是一个bug . 报告在这里:https://developers.facebook.com/bugs/707332642990208/

    没有 time_range param,可以很好地工作 . 所以,可能是临时解决方案 .

  • 1

    我没有't know if this is a bug or not: facebook does this from time to time and is implementing check routines for parameters - in fact "adaccounts don' t有任何参数:facebook api reference adaccount reading

    您收到的错误(#100)表示"invalid parameter"(facebook reference adaccount validation rules),这是因为您可能已经定义了time_range,并且您要求api为adaccount中的广告系列 . 但是:对于adaccount edge time_rage参数无效 .

    The solution 将首先向api询问 https://graph.facebook.com/v2.11/{account_id}/campaigns ,然后定义(time_range)参数以获取广告系列的见解 .

相关问题