我尝试根据通过图谱API找到的Instagram帖子ID访问Instagram帖子到达
impressions= graph.get_object(id='17881493329146188', fields='reach')
我收到以下错误:
GraphAPIError: (#100) Tried accessing nonexisting field (reach) on node type (ShadowIGMedia)
有没有办法通过这个Facebook API Python包装器成功检索Instagram帖子的覆盖率?
答案 0 :(得分:0)
Reach
不是媒体上的字段,而是对象下的insights
。你可以这样做:
impressions = graph.get_object(id='17881493329146188', fields='insights.metric(reach)')
根据对象的类型,您可能需要指定period
和其他字段,例如fields='insights.metric(reach).period(lifetime)'