简体   繁体   English

用于Python Facebook API的Instagram数据

[英]Instagram Data For Python Facebook API

I tried accessing Instagram post reach based on the Instagram post ID found via the Graph API 我尝试根据通过Graph API找到的Instagram帖子ID访问Instagram帖子覆盖率

impressions= graph.get_object(id='17881493329146188', fields='reach')

I am getting the following error: 我收到以下错误:

GraphAPIError: (#100) Tried accessing nonexisting field (reach) on node type (ShadowIGMedia)

Is there any way to successfully retrieve reach on Instagram posts through this Facebook API Python wrapper? 是否有任何方法可以通过此Facebook API Python包装器成功检索Instagram帖子上的覆盖率?

Reach isn't a field on media, but on the insights under the object. Reach不是媒体领域,而是对象下的insights You could do: 您可以这样做:

impressions = graph.get_object(id='17881493329146188', fields='insights.metric(reach)')

Depending on what type of object that is, you may need to specify period and other fields, eg fields='insights.metric(reach).period(lifetime)' 根据对象的类型,您可能需要指定period和其他字段,例如, fields='insights.metric(reach).period(lifetime)'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM