https://api.instagram.com/v1/users/510573486/media/recent?access_token=510573486.ab7d4b6.d8b155be5d1a47> 8>
https://api.instagram.com/v1/users/20282699/media/recent?access_token=510573486.ab7d4b6.d8b155be5d1a47c78f72616b4d942e8d
如果是这样,为什么
解决方案
令牌是必需的,因此无法匿名访问API 。 Instagram照片是公开的,除非用户明确将其帐户设置为私人。因此,通常可以使用单个有效令牌访问任何公共用户帐户的提要。
令牌不会绕过用户的设置。如果您尝试访问标记为私人的帐户,则不会得到任何结果,而是会收到以下响应:
{ meta: { error_type: APINotAllowedError, code:400, error_message:您无法查看此资源}}
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://api.instagram.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
If so, why do I have to request an access_token in order to do the request?
解决方案
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":"you cannot view this resource"}}
这篇关于Instagram访问令牌可检索任何用户供稿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!