简体   繁体   English

通过Facebook Graph-API访问Instagram

[英]Access to Instagram via Facebook Graph-API

I have an Instagram Business Account connected to a Facebook Page. 我有一个Instagram商业帐户连接到Facebook页面。 When I try to access Instagram via the Graph-API I get an Unsupported get request. Object with ID '{instagram account-id}' does not exist, cannot be loaded due to missing permissions, or does not support this operation. 当我尝试通过Graph-API访问Instagram时,收到Unsupported get request. Object with ID '{instagram account-id}' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Unsupported get request. Object with ID '{instagram account-id}' does not exist, cannot be loaded due to missing permissions, or does not support this operation.
The query I tried was (among others): /v3.0/{insta-id}?fields=follow_count 我尝试过的查询(包括其他查询):/ /v3.0/{insta-id}?fields=follow_count

I tried personal- and page access tokens. 我尝试了个人和页面访问令牌。 What am I missing? 我想念什么? Thanks 谢谢

What's interesting is that in your message you used {instagram account-id} to replace a numeric value that you saw in Facebook response. 有趣的是,您在邮件中使用{instagram account-id}替换了您在Facebook响应中看到的数字值。 This number IS NOT your Instagram ID (as in your ID on Instagram). 此号码不是您的Instagram ID(就像您在Instagram上的ID一样)。 This number is Facebook's Instagram Business ID. 该号码是Facebook的Instagram企业ID。 It goes like this: 它是这样的:

Facebook page (facebook page id) is associated with an Instagram Profile (instagram id) via Instagram Business Account (instagram business id). Facebook页面(facebook页面ID)通过Instagram企业帐户(instagram企业ID)与Instagram个人资料(instagram id)相关联。

In your above message, that ID is "instagram business id". 在您上面的消息中,该ID为“ instagram商业ID”。

Why would it be missing? 为什么会丢失? It is important how it was created: Instagram user, on their device, converted their Instagram account to Instagram Business account. 创建它的方式很重要:Instagram用户在其设备上将其Instagram帐户转换为Instagram商业帐户。 When they did the selected a facebook page. 当他们选择了一个Facebook页面时。 This created "instagram business id". 这创建了“ instagram商业ID”。

If this user ever loses admin access to the Facebook page (or becomes anything other then admin) - "instagram business id" will become invalid. 如果该用户失去了对Facebook页面的管理员访问权限(或变为管理员以外的其他权限),则“ instagram商业ID”将无效。

How to fix? 怎么修? Simple, go to your device, convert your instagram profile to personal and then convert it back to business. 很简单,转到您的设备,将您的instagram个人资料转换为个人资料,然后再将其转换为业务。 You will get a new "instagram business id" so you will need to query that on your page. 您将获得一个新的“ instagram企业ID”,因此您需要在页面上进行查询。

You need to use the following request 您需要使用以下请求

me?fields=instagram_business_account - » me?fields = instagram_business_account-»

By this in the response you will get the business page id on that node you can make severall request. 通过此响应,您将获得该节点上的业务页面ID,您可以进行多次请求。

For instance 例如

{id}/media?fields=caption,like_count,comments_count,media_url {id} / media?fields = caption,like_count,comments_count,media_url

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

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