如何在我的网站上显示我的Instagram提要? [英] How to display my Instagram feed on my website?

查看:79
本文介绍了如何在我的网站上显示我的Instagram提要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个显示我的Instagram提要的网站.以前我在用Instagram遵循API.用户/自我/媒体/最近

i have a website that shows my Instagram feed. previously i was using Instagram following API. users/self/media/recent

此API使用的访问令牌是我生成的,并且作为变量保存在我的代码中,并且没有对其进行长时间更改(2-3年).现在,当不推荐使用此API时,Instagram建议使用基本显示API",我们需要为其创建一个访问令牌,该令牌将在1小时或60天内失效.它还说它只能使用一次.而且我有兴趣显示我的Instagram提要,而我不希望显示已登录我的网站的用户的提要.是否有一个API不需要对令牌进行持续身份验证,就可以用于检索Instagram feed

This API was using access token that i generated once and kept in as a variable in my code without changing it for long time (for 2-3 years). Now when this API is deprecated Instagram is recommending to use 'Basic Display API' for which we need to create a access token which will expire in 1 hour or 60 days. It also says that it can be used only once. And i am interested in showing my Instagram feed I'm not interested in showing feed of the user who is logged-in in my website. Is there a API which will not have to constantly authenticated for token and can be used to retrieve Instagram feed

推荐答案

不幸的是,Instagram使得获取用户媒体变得更加困难.所有公用方法都不再每次都起作用.

Unfortunately, Instagram has make it harder to get user media. All public method are not working every time anymore.

我的建议是,当有人访问您的网站时,您可以使用旧令牌生成新令牌并将其存储在下一次访问中.

My suggestion is when someone visited your website, you can use the old token to generate a new token and store it somewhere for next visit.

来源: https://developers.facebook.com/docs/instagram-basic-display-api/reference/refresh_access_token

这篇关于如何在我的网站上显示我的Instagram提要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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