【问题标题】:"Invalid scope field(s): public_content" error showing in instagram api in php“无效的范围字段:public_content”错误显示在 php 的 instagram api 中
【发布时间】:2019-09-06 08:28:17
【问题描述】:

我正在使用 php 使用 instagram api,我想关注我朋友的所有用户/朋友,所以为此 首先是授权,我尝试了以下代码

https://api.instagram.com/v1/users/xxxxxxx(clientid)/follows?access_token=xxxxxx.xxxxxx.xxxxxxxxxxxxxxx

但我收到以下错误

code    400
error_type  "OAuthPermissionsException"
error_message   "This request requires scope=follower_list, but this access token is not authorized with this scope. The user must re-authorize your application with scope=follower_list to be granted this permissions."

然后我尝试使用以下代码

https://www.instagram.com/oauth/authorize/?client_id=xxxxxxxxxxx&redirect_uri=http://mywebsite.com/&response_type=token&scope=follower_list

然后我得到以下错误

error_type  "OAuthException"
code    400
error_message   "Invalid scope field(s): follower_list"

我怎样才能得到这份清单?提前致谢。

【问题讨论】:

标签: php api instagram instagram-api


【解决方案1】:

Instagram 文档:

OAuth 2.0 规范允许您指定您向用户请求的访问权限的范围。默认情况下,所有已批准的应用程序都具有基本访问权限,但如果您计划请求扩展访问权限,例如阅读公共内容、喜欢、评论或管理友谊,则需要在授权请求中指定这些范围。请注意,要使用这些扩展权限,您必须先提交您的应用以供审核。以下是我们目前支持的范围:

基本 - 读取用户的个人资料信息和媒体

【讨论】:

  • 我只使用来自 Instagram 的基本访问权限,即使我遇到了同样的错误。有什么帮助吗?
  • 是的,我在我的 xamarin 应用程序中也只使用了基本范围,但仍然遇到相同的异常 @Deilusia
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-14
  • 1970-01-01
  • 1970-01-01
  • 2018-03-26
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多