Instagram访问令牌可检索任何用户供稿 [英] Instagram access token to retrieve any user feed

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

问题描述

我可以使用相同的access_token来任何用户供稿是正常的吗?这是两个例子。首先是来自测试帐户,这是我应该访问的帐户。第二个来自ImagineDragons的instagram feed。



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

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屋!

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