如何使用新的 Graph API 访问任何用户的 Instagram 提要? [英] How to access Instagram feed of any user with new Graph API?

查看:30
本文介绍了如何使用新的 Graph API 访问任何用户的 Instagram 提要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Facebook 最近推出了 Instagram Graph API,它允许获取数据instagram.com/developers 声明:从连接到您的 Facebook 公司页面的 Instagram 页面:

Facebook recently introduced Instagram Graph API, which allows to fetch data from Instagram page that is connected to your Facebook company page, instagram.com/developers states:

Instagram Graph API 现在可供所有开发者使用.
对于非商业 Instagram 帐户,请继续使用现有的 Instagram API.

The Instagram Graph API is Now Available to All Developers.
For Non-Business Instagram Accounts please continue to use the existing Instagram API.

例如,如果我的公司有帐户 instagram.com/my_first_company,我只能检索其提要,而不能检索其他人.

So, for example, if my company has account instagram.com/my_first_company, I can only retrieve its feed and no one else.

使用旧的 Instagram API 来检索 public_content 权限(访问任何提要)也不再是一种选择,来自 旧 API 文档:

Using old Instagram API to retrieve public_content permission (access to any feed) is no longer an option too, from old API documetation:

public_content - 读取用户的任何公开个人资料信息和媒体代表(不再接受申请)

public_content - to read any public profile info and media on a user’s behalf (applications no longer accepted)

<小时>

  • 拥有 public_content 权限的现有工具会怎样?(例如,各种 CMS 有大量插件可以显示最近的 Instagram 照片)
  • 现在有什么有效的方法可以访问 public_content(访问任何提要)(除了获取 Instagram 网站的 HTML 页面)?
  • 是否有计划为非企业客户启用 Graph API,大概什么时候?

    • What will happen to existing tools that have public_content permission? (for example, there are tons of plugins for various CMS that allow to display recent Instagram photos)
    • Is there any valid way to access public_content (access to any feed) right now (besides fetching HTML pages of Instagram website)?
    • Are there any plans to enable Graph API for non-business customers, of so when?
    • 更新.似乎有 ?__a=1 端点允许在没有任何令牌的情况下访问任何公共提要的最近照片.但这不是官方的,也没有人知道 Instagram 何时/是否会关闭它.如果你这样做 - 请告诉我.

      UPD. There seem to be ?__a=1 endpoint that allows to get access to recent photos of any public feed without any tokens. But it's not official and no one knows when/if Instagram will close it. If you do - please let me know.

      UPD 2. Instagram 删除了 ?__a=1 端点,不确定多久,可能永远.目前访问 instagram 提要的唯一方法是废弃 instagram.com 网站,这太可怕了.

      UPD 2. Instagram removed ?__a=1 endpoint, not sure for how long, probably forever. Currently the only way to access instagram feed is to scrap instagram.com website, which is a horror.

      推荐答案

      先决条件:您首先需要将企业 Instagram 帐户与 FB Page 关联.https://help.instagram.com/356902681064399 - 可以从 Instagram 帐户的个人资料页面执行此操作.

      Prerequisite: You first need the business Instagram account to be linked with FB Page. https://help.instagram.com/356902681064399 - That one can do from the profile page of Instagram account.

      • 获取 Instagram 企业帐户 ID:graph.facebook.com/v2.8/?fields=instagram_business_account.(fbPageId 是账户关联的 facebook 页面的页面 ID)

      • Get the Instagram business account id: graph.facebook.com/v2.8/<fbPageId>?fields=instagram_business_account. (the fbPageId is the page id of the facebook page the account is linked)

      获取 Instagram 媒体源:graph.facebook.com/v2.8//media 以获取 Instagram 帐户的媒体源.(igBusinessId 是上面链接的 instagram_business_account 中返回的 ID) - 根据页面 access_token,这仍然是拥有的媒体.不是任何其他用户的供稿.

      To fetch instagram media feed: graph.facebook.com/v2.8/<igBusinessId>/media to fetch the media feed of the Instagram account. (the igBusinessId is the id returned in above linked instagram_business_account) - This is still owned media as per the page access_token. Not any other user's feed.

      提到的所有其他端点(例如评论审核、详细见解 API)此处 适用于上述调用返回的商业媒体列表.

      All other endpoints (such as comments moderation, detailed insights API) mentioned here works on the business media list returned on above call.

      请注意:这仍然不允许获取未经身份验证的用户的 Instagram 提要.现在通过 API 是不可能的.没有通过 API 获得 public_content 范围的有效方法.可能有少数 Instagram 营销合作伙伴启用了此功能.但是,现在一般不推荐使用范围!

      Please note: This still does not allow to fetch un-authenticated user's Instagram feed. That is not possible via API now. There is no valid way via API to get to public_content scope. There can be few Instagram Marketing partners for which this is enabled. But, in general the scope is deprecated now!

      目前,要使 FB 图形 API 正常工作,我们需要将业务页面链接到 Instagram 帐户.如上所述 apis 使用页面令牌.

      Currently, for FB graph API to work we need linked business page to Instagram account. As above apis uses page tokens.

      这篇关于如何使用新的 Graph API 访问任何用户的 Instagram 提要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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