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
来源:https://stackoverflow.com/questions/30137322/access-token-is-not-authorized-with-this-scope-relationship