Idea of the app
我正在开发一个webapp,它将显示具有特定标签的最新媒体 . 此标签用于发布大型建筑物中的最新信息 . 每分钟都会检查上传的媒体并将其添加到显示器 .
The problem
我发现Instagram已经更新了他们的API政策并增加了一些限制 . Instagram应用程序需要在上市之前进行审核 . 问题是审查过程需要使用正在使用的功能的完整演示,但在审查之前我无法使其工作...
How it works
我获得了一个访问令牌:
https://api.instagram.com/oauth/authorize/?client_id=xXxXx&redirect_uri=http://thewebapp.dev/&response_type=token
我得到一个accessstoken并试图获得媒体: https://api.instagram.com/v1/tags/theTag/media/recent?&callback=window.feed.load&access_token=xXxXx&callback=jQuery183033466151752509177_1450854322095&_=1450854322117
我从API收到此错误: {"meta":{"error_type":"OAuthPermissionsException","code":400,"error_message":"This request requires scope=public_content, but this access token is not authorized with this scope. The user must re-authorize your application with scope=public_content to be granted this permissions."}}
What does the docs say?
它应该用一个简单的https://api.instagram.com/v1/tags/nofilter/media/recent?access_token=ACCESS_TOKEN
它应该适用于沙盒模式(我用正确的帐户验证)
我真的无法弄清楚它为什么不起作用 . 有经验的人吗?
1 回答
我发现了这个问题 . 我必须在授权期间添加正确的范围 . 它应该是:
请注意,沙箱模式仅返回沙盒用户发布的媒体 . 我认为新的API很糟糕,因为它不是开发人员友好的 .