Instagram API,使用客户端凭据而不是用户访问令牌获取 Instagram 图像
我需要将 Instagram 企业帐户中的图像显示到我的网站上。我只需要最后 5 张图片。我不需要其他 Instagram 帐户和访问令牌(我想与我的用户一起提取图像)。
通过文档: https://developers.facebook.com/docs/instagram-api# instagram-graph-api
- 我创建了所有 Facebook 应用程序
- 使用 Instagram 授权窗口创建了访问令牌(不想要)
- 我正在使用用户的访问令牌获取图像(不想要)
- 我也尝试过 https://www.instagram.com/:name/?__a=1 但是图像问题
知道如何在我的网站上没有 Instagram 授权窗口的情况下从 Instagram 提取图像吗? 是否可以使用客户端凭据流创建访问令牌?
I need to show images from my Instagram business account to my website. I just need the last 5 images. I do not need other Instagram accounts and access tokens (I want to pull images with my user).
By documentation:
https://developers.facebook.com/docs/instagram-api#instagram-graph-api
- I created all Facebook apps
- Created access token with the Instagram authorization window (do not want)
- I am fetching images with user's access tokens (do not want)
- Also I tried https://www.instagram.com/:name/?__a=1 but cors issue with images
Any idea how to pull images from Instagram without the Instagram authorization window on my website?
Is it possible to create an access token with client credentials flow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用带有访问令牌的 OAuth 是从 Instagram 提取内容的唯一方法。 Instagram 没有公共 API——如果没有授权它就会是公共 API。
您需要的是后端服务。由于您只获取自己的数据,因此生成访问令牌并将其存储在服务器端 - 一次性事件。创建一个端点来获取最后 5 个帖子,服务器端使用访问令牌进行 Instagram API 调用。前端将调用您的新端点并显示帖子。
另一种选择是付费社交媒体聚合器。
Using OAuth with the access tokens is the only way to pull content from Instagram. Instagram doesn't have a public API - if there were no authorization it would be a public API.
What you need is a back-end service. Since you're only getting your own data, generate the access tokens and store them server side - a one time event. Create an endpoint to get the last 5 posts and server-side make the Instagram API call with the access tokens. The front-end will call the your new endpoint and display the posts.
Another option is a paid social media aggregator.