Android, Instagram 取消关注用户无法完成?
Android, Instagram unfollow user can't be done?
我正在开发 Instagram 集成应用程序。我想取消关注某个用户,但我从 Instagram 得到了不相关的答案,包括 html doctype 说 "sorry, this page isn't available"。我在我的访问令牌 url 中提到了关系许可。是否需要审查程序?这是我的代码:
new Thread(new Runnable() {
@Override
public void run() {
try{
String urlFollowUnFollow = "https://api.instagram.com/v1/users/"
+ username
+ "/relationship?access_token="
+ GetStats.ACCESS_TOKEN;
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
nameValuePairs.add(new BasicNameValuePair("action", "unfollow"));
try {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(urlFollowUnFollow);
httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(
is, "iso-8859-1"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
response = sb.toString();
} catch (Exception e) {
Log.e("Buffer Error", "Error converting result " + e.toString());
}
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!" + response + " !!!!!!!!!!!!!!!!!!!!!!!!!");
} catch (Exception exception) {
exception.printStackTrace();
}
}}
).start();
顺便说一句,我看过其他 Whosebug 帖子。 none 有帮助。提前致谢。
问题是我的客户没有关系权限。为了获得这些访问权限,我必须将我的应用程序提交给 Instagram 进行审核。
我正在开发 Instagram 集成应用程序。我想取消关注某个用户,但我从 Instagram 得到了不相关的答案,包括 html doctype 说 "sorry, this page isn't available"。我在我的访问令牌 url 中提到了关系许可。是否需要审查程序?这是我的代码:
new Thread(new Runnable() {
@Override
public void run() {
try{
String urlFollowUnFollow = "https://api.instagram.com/v1/users/"
+ username
+ "/relationship?access_token="
+ GetStats.ACCESS_TOKEN;
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
nameValuePairs.add(new BasicNameValuePair("action", "unfollow"));
try {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(urlFollowUnFollow);
httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(
is, "iso-8859-1"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
response = sb.toString();
} catch (Exception e) {
Log.e("Buffer Error", "Error converting result " + e.toString());
}
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!" + response + " !!!!!!!!!!!!!!!!!!!!!!!!!");
} catch (Exception exception) {
exception.printStackTrace();
}
}}
).start();
顺便说一句,我看过其他 Whosebug 帖子。 none 有帮助。提前致谢。
问题是我的客户没有关系权限。为了获得这些访问权限,我必须将我的应用程序提交给 Instagram 进行审核。