【发布时间】: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