【问题标题】:Access token is not authorized with this scope relationship访问令牌未获得此范围关系的授权
【发布时间】:2015-05-09 07:35:23
【问题描述】:

我正在像这样将范围附加到身份验证网址 >>> scope=likes+cmets+relationships+basic";

但是在登录的时候,它并没有向用户请求关系权限,只是显示“这个应用可以访问你的照片”。

每当我通过点击

关注或取消关注任何用户时,在应用程序内部
String url="https://api.instagram.com/v1/users/"+userid+"/relationship/?access_token="+MainSingleTon.accesstoken;
            // key and value pair
            List<NameValuePair> nameValuePair = new ArrayList<NameValuePair>(1);
            nameValuePair.add(new BasicNameValuePair("action","unfollow"));


            JSONObject json=jParser.getJSONFromUrlByPost(url, nameValuePair);

我得到 json 响应为

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

【问题讨论】:

  • 您应该阅读 api 的文档,并检查您需要将哪个令牌附加到请求中
  • @Blackbelt 这是我登录后获得的相同访问令牌
  • 在尝试使用另一个用户 ID 时,我得到以下响应。 {"meta":{"error_type":"APIError","error_message":"此客户端 ID 不允许发布关系操作。有关更多信息,请参阅我们的开发者网站 http://\/instagram。 com\/developer\/endpoints\/relationships.","code":400}} --------------我已经在 developer.instgram.com 下申请了这个范围的权限。那边没有回应,已经过去10天了。

标签: android instagram instagram-api


【解决方案1】:

这是一个发布请求。要向 InstagramAPI 提出发布请求,您需要将您的申请详细信息和公司详细信息提交给 Instagram 以供审核。也许其他关系端点可以在不提交您的应用程序的情况下正常工作。更多详情请访问以下链接https://instagram.com/developer/endpoints/relationships/#post_relationship

【讨论】:

    猜你喜欢
    • 2021-04-10
    • 2020-04-22
    • 1970-01-01
    • 2021-10-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-24
    • 1970-01-01
    相关资源
    最近更新 更多