访问令牌没有被授权使用该范围关系 [英] Access token is not authorized with this scope relationship

查看:213
本文介绍了访问令牌没有被授权使用该范围关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我追加范围AUTH URL像这样>>>范围=喜欢+评论+关系+基础;

不过,虽然登录,它不要求用户的关系许可,只显示该应用程序可以接取你的照片。

里面每当我follwoing,或按unfollwing任何用户的应用程序

 字符串url="https://api.instagram.com/v1/users/"+userid+"/relationship/?access_token="+MainSingleTon.accesstoken;
            //键值对
            名单<的NameValuePair>的NameValuePair =新的ArrayList<的NameValuePair>(1);
            nameValuePair.add(新BasicNameValuePair(行动,取消关注));


            JSONObject的JSON = jParser.getJSONFromUrlByPost(URL,的NameValuePair);
 

我收到的JSON响应,

  {元:{ERROR_TYPE:OAuthPermissionsException,ERROR_MESSAGE:这个请求需要范围=的关系,但这种访问令牌没有被授权与此范围内的。用户必须重新授权使用范围=关系,你的应用程序被授予写权限,code:400}}
 

解决方案

这是一个POST请求。为实现到InstagramAPI您需要提交您的申请资料和公司的细节,Instagram的审查职位的要求。也许其他关系,终端将正常工作没有提交你的应用程序。欲了解更多详情,请访问以下链接 https://instagram.com/developer/endpoints/relationships/# post_relationship

I am appending scope to auth url like this >>> scope=likes+comments+relationships+basic";

But while logging in, it is not asking user for relationship permission, only showing "this app can acess your photos".

Inside the application whenever i am follwoing or unfollwing any user by hitting

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);

i am getting json response as

{"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}}

解决方案

This is a post request. To make post request to InstagramAPI you need to submit your application details and company details to Instagram for review. Maybe other relationship endpoints will work fine without submitting your app. For more details visit the following link https://instagram.com/developer/endpoints/relationships/#post_relationship

这篇关于访问令牌没有被授权使用该范围关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆