Instagram的API - 获取用户的私人饲料授权用户为之如下 [英] Instagram API - Getting feed of private user whom the authorised user follows
问题描述
我使用Instagram的API为我的申请。我需要访问的人我下面私人用户的饲料,但反应是:
I am using Instagram API for my application. I need access to the feed of private users whom I am following, but the response is:
code: 400
error_type: APINotAllowedError
error_message: you cannot view this resource
我找不到文档中关于这个事情。
我希望,因为我能看到我的应用程序用户的饲料,我就可以使用API来获取相同的。
I could not find anything in the documentation regarding this. I was hoping that as I am able to see the user's feed on my app, I would be able to retrieve the same using the API.
解决这个办法?
请帮助。
Any way around this? Please help.
推荐答案
我面临同样的问题,原因是它发生时的职位是私人的,即使用户访问令牌与端点这个错误发生过去了。
I faced same issue and the cause is it happens when the posts are private , even if user access token is passed with endpoints this errors happen.
解决方案:刚刚到位专用配置文件的用户ID使用'自我'的。也就是说,如果一个配置专用帖那么谁应该连接是同一个人的形象和其他人无法查看他/她的职位。
Solution: just in place of userid use 'self' for private profile. means if a profile has private posts then who connects should be the same person of the profile and other person can not view his/her posts.
例如:
的https://api.instagram.com/v1/users/USER_ID/media/recent/?access_token=USER_ACCESS_TOKEN_HERE如果此端点显示错误,则使用
的https://api.instagram.com/v1/users/self/media/recent/?access_token=USER_ACCESS_TOKEN_HERE
https://api.instagram.com/v1/users/USER_ID/media/recent/?access_token=USER_ACCESS_TOKEN_HERE if this endpoints shows error then use https://api.instagram.com/v1/users/self/media/recent/?access_token=USER_ACCESS_TOKEN_HERE
(只是'自我'取代'用户ID')
(just replace 'userid' with 'self')
这篇关于Instagram的API - 获取用户的私人饲料授权用户为之如下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!