Instagram的数据对于Python Facebook的API
问题描述:
我尝试基于通过图形APIInstagram的数据对于Python Facebook的API
impressions= graph.get_object(id='17881493329146188', fields='reach')
我收到以下错误发现Instagram的帖子ID访问Instagram的信息覆盖率:
GraphAPIError: (#100) Tried accessing nonexisting field (reach) on node type (ShadowIGMedia)
有什么通过Facebook API Python包装器成功检索Instagram帖子的覆盖面的方法?
答
Reach
不是介质上的字段,而是在insights
下的对象。你可以这样做:
impressions = graph.get_object(id='17881493329146188', fields='insights.metric(reach)')
取决于什么类型的对象,它是的,你可能需要指定period
等领域,例如fields='insights.metric(reach).period(lifetime)'