无法让 Instagram 应用与新的 API 政策和限制一起使用
Can't get Instagram app work with the new API policy and restrictions
应用创意
我正在开发一个 Web 应用程序,它将显示带有特定标签的最新媒体。此标签用于 post 大型建筑物中发生的事情。每分钟它都会检查上传的媒体并将它们添加到显示中。
问题
我发现 Instagram 更新了他们的 API 政策并添加了一些限制。 instagram 应用需要审核才能上线 public。问题是审查过程需要所用功能的完整演示,但在审查之前我无法让它工作...
工作原理
我通过以下方式获取访问令牌:
https://api.instagram.com/oauth/authorize/?client_id=xXxXx&redirect_uri=http://thewebapp.dev/&response_type=token
我正在获取访问令牌并尝试通过以下方式获取媒体: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."}}
文档怎么说?
它应该与简单的 https://api.instagram.com/v1/tags/nofilter/media/recent?access_token=ACCESS_TOKEN
一起工作
它应该在沙盒模式下工作(我用正确的帐户验证)
我真的想不通为什么它不起作用。谁有这方面的经验?
我发现了问题。我必须在授权期间添加正确的范围。应该是:
https://api.instagram.com/oauth/authorize/?client_id=xXxXx&redirect_uri=http://thewebapp.dev/&response_type=token&scope=public_content
请注意,沙盒模式仅 returns 沙盒用户发布的媒体。我认为新的 API 很糟糕,因为它对开发人员不友好。
应用创意
我正在开发一个 Web 应用程序,它将显示带有特定标签的最新媒体。此标签用于 post 大型建筑物中发生的事情。每分钟它都会检查上传的媒体并将它们添加到显示中。
问题
我发现 Instagram 更新了他们的 API 政策并添加了一些限制。 instagram 应用需要审核才能上线 public。问题是审查过程需要所用功能的完整演示,但在审查之前我无法让它工作...
工作原理
我通过以下方式获取访问令牌:
https://api.instagram.com/oauth/authorize/?client_id=xXxXx&redirect_uri=http://thewebapp.dev/&response_type=token
我正在获取访问令牌并尝试通过以下方式获取媒体: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."}}
文档怎么说?
它应该与简单的 https://api.instagram.com/v1/tags/nofilter/media/recent?access_token=ACCESS_TOKEN
一起工作它应该在沙盒模式下工作(我用正确的帐户验证)
我真的想不通为什么它不起作用。谁有这方面的经验?
我发现了问题。我必须在授权期间添加正确的范围。应该是:
https://api.instagram.com/oauth/authorize/?client_id=xXxXx&redirect_uri=http://thewebapp.dev/&response_type=token&scope=public_content
请注意,沙盒模式仅 returns 沙盒用户发布的媒体。我认为新的 API 很糟糕,因为它对开发人员不友好。