本文介绍了用于检索任何用户提要的 Instagram 访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用相同的 access_token 获取任何用户提要是否正常?这里有两个例子.第一个来自测试帐户,这是我应该可以访问的.第二个来自 ImagineDragons 的 Instagram 提要.

Is it normal that I can get any users feed with the same access_token? Here are two examples. The first is from the test account, it is what I should have access to. And the second one is from the ImagineDragons's instagram feed.

https://stapnof.com/v1/users/510573486/media/recent?access_token=510573486.ab7d4b6.d8b155be5d1a47c78f72616b4d942e8d

https://api.instagram.com/v1/users/20282699/media/recent?access_token=510573486.ab7d4b6.d8b155be5d1a47c78f72616b4d942e8d

如果是这样,为什么我必须请求 access_token 才能执行请求?

If so, why do I have to request an access_token in order to do the request?

推荐答案

需要令牌,因此无法匿名访问 API.Instagram 照片是公开的,除非用户明确将其帐户设置为私人帐户.因此,能够使用单个有效令牌访问任何公共用户帐户的提要是正常的.

The token is required so the API cannot be accessed anonymously. Instagram photos are public unless the user has explicitly set their account to be private. Therefore, it is normal to be able to access the feeds of any public user account with a single valid token.

令牌不会绕过用户的设置.如果您尝试访问标记为私有的帐户,您将不会得到任何结果,而是会收到以下回复:

A token does not circumvent users' settings. If you try to access an account that is marked private you won't get any results and instead receive this response:

{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"您无法查看此资源"}}

这篇关于用于检索任何用户提要的 Instagram 访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!