Instagram 访问令牌坏了需要一个新的?

Instagram access token broke and needed a new one?

所以我嵌入了一个网站以使用该网站提供 Instagram 提要:http://instafeedjs.com/

我让它工作了,它运行了一个星期左右,有一天它随机中断并出现错误 "Invalid access Token"。

我得到了一个新令牌,它又可以使用了,但我很好奇为什么我的原始令牌需要刷新?据我所知,它们不应该过期。任何人对此有任何想法,所以我可以找出它为什么坏了?

Instagram 没有为其令牌提供到期时间,令牌可能随时到期。

以下文字来自Instagram's Developer Authentication page:

Access tokens may expire at any time in the future. [...]

Even though the access token does not specify an expiration time, your app should handle the case that either the user revokes access, or Instagram expires the token after some period of time. In this case, your meta of your responses will contain an “error_type=OAuthAccessTokenError”. In other words: do not assume your access_token is valid forever.