Access token is not authorized with this scope relationship

隐身守侯 提交于 2019-12-02 08:57:53

问题


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

回答1:


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



来源:https://stackoverflow.com/questions/30137322/access-token-is-not-authorized-with-this-scope-relationship

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!