【问题标题】:Getting a 100 error and I do a Get call with the facebook api收到 100 错误,我使用 facebook api 进行 Get 调用
【发布时间】:2017-08-03 21:26:41
【问题描述】:

我刚刚从 facebook 2.8 更新到 2.10。然后我遍历并取出了所有已弃用的字段。现在我正在运行我的代码,我得到了一个

Message: Call was not successful
  Method:  GET
  Path:    https://graph.facebook.com/v2.10/{pageid}/insights
  Params:  {'fields': '["ad_id","ad_name","adset_id","adset_name","campaign_id","campaign_name","account_id","account_name","buying_type","relevance_score","spend","reach","impressions","clicks","social_reach","social_impressions","unique_clicks","social_clicks","unique_social_clicks","call_to_action_clicks","inline_link_clicks","unique_inline_link_clicks","inline_post_engagement","objective","total_actions","total_unique_actions"]', 'level': 'ad', 'time_ranges': '[{"since":"2017-08-03","until":"2017-08-03"}]'}

  Status:  400
  Response:
    {
      "error": {
        "message": "Unsupported get request.", 
        "code": 100, 
        "type": "GraphMethodException", 
        "fbtrace_id": "AStcsafetT"
      }
    }

我一直在查看 api,这些数据类型都没有变化。当我运行我的 python 脚本时,我在 cmd 中的输出:

TypeError: 'NoneType' object has no attribute '__getitem__'

我很确定这意味着我返回 None 。所以我返回一个空字符串?

谢谢

【问题讨论】:

  • 如果您指定较少的字段,该错误会消失吗?您甚至在这里要求什么洞察指标
  • 我现在正在这样做,点击次数、展示次数和支出是关键因素
  • 看来只带ad_id还是会报这个错误
  • 我想我发现它与管理员访问权限有关,而没有找到页面。

标签: python facebook python-2.7 facebook-graph-api python-requests


【解决方案1】:

这与无效参数无关。帐户已停用,出现此错误

Status:  400
  Response:
    {
      "error": {
        "message": "Unsupported get request.", 
        "code": 100, 
        "type": "GraphMethodException", 
        "fbtrace_id": "AStcsafetT"
      }
    }

说明我试图查找的帐户不存在,并且没有返回任何内容。

【讨论】:

    猜你喜欢
    • 2014-10-27
    • 1970-01-01
    • 2012-08-16
    • 1970-01-01
    • 2013-02-24
    • 1970-01-01
    • 2021-11-07
    • 2022-01-07
    • 1970-01-01
    相关资源
    最近更新 更多