Instagram 图谱 API [英] Instagram Graph API

查看:55
本文介绍了Instagram 图谱 API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是使用 Instagram Graph API 获取我的商业 Instagram 帐户的照片数据.我按照 Instagram Graph API 的说明进行操作 -https://developers.facebook.com/docs/instagram-api/参考/用户/媒体,这表示请求像

My task is to get photo data of my business Instagram account with Instagram Graph API. I followed the instruction from Instagram Graph API - https://developers.facebook.com/docs/instagram-api/reference/user/media , which said request like

GET http://graph.facebook.com/17841405822304914/media

可以从与FB账号关联的Instagram账号中获取JSON格式的照片数据.

can get photo data from the Instagram account linked to the FB account in JSON format.

我尝试发送 GET 请求/my_facebook_id/media 如文档所述,在 FB 开发人员平台上使用 Graph API Explorer,但它未能返回我想要的数据.这是我得到的错误:

I tried to send GET request /my_facebook_id/media as said by the document with Graph API Explorer on FB developer platform but it failed to return the data I want. This is the error I got:

消息:尝试访问节点类型(用户)上不存在的字段(媒体)类型:OAuthException 代码:100

message: Tried accessing nonexisting field (media) on node type (User) type: OAuthException code: 100

该消息是否表示 FB 用户中不存在 media 字段?

Does the message mean the media field doesn't exist in the FB user?

错误代码 100 是什么意思?我什至在 FB 官方文档中都看不到.

What is the meanIng of error code 100? I can't even see that in FB official document.

我尝试将 Instagram 企业帐户 ID 用于此请求,但收到一条错误消息,指出用户对象不存在

I tried to use the Instagram business account ID for this request but I got an error message said the user object doesn't exist

如何完成任务?谢谢!

推荐答案

我猜你错过了创建 Facebook 商业页面并将你的 Instagram 商业帐户链接到它.

I guess you have missed creating a Facebook business page and linking your Instagram Business account to it.

这是设置指南:https://developers.facebook.com/docs/instagram-api/getting-started

如果这样做正确,但您仍然面临错误,那是因为 Facebook 错误导致您的帐户没有正确链接.

If this was done correctly and still you're facing the error is because of a Facebook bug where your account doesn't get linked correctly.

这里:https://developers.facebook.com/support/错误/177912116363088/?disable_redirect=0

解决方案:请断开您的 Instagram 帐户与页面的连接.然后,在 Instagram 应用程序中,在设置中您必须切换回个人帐户并重新转换为企业帐户

Solution : Please disconnect your Instagram account from your page. Then, on Instagram app, in setting you will have to switch back to personal account and reconvert to a business account

注意:切换到个人帐户后,您将失去媒体洞察力.

Note : Switching to a personal account you will lose the insights of your media.

完成此操作后,您应该能够获取 instagram_business_account 并发布您可以运行查询以获取媒体的帖子:

Once this is done you should be able to get instagram_business_account and post which you can run your query to fetch the media :

GET http://graph.facebook.com/you-instagram-business-account-id/media

这篇关于Instagram 图谱 API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆