코드 https://github.com/FredrikL/android-ttTumblr에 언급 된 코드를 사용했습니다. 이 코드를 사용할 때 사용자 이름과 암호를 인증 할 수 없습니다. 어느 한 PLZ 도와있다 .. 다음 코드 내가지고있어,이 후 인증을위한 텀블러tumblr을 인증 할 수 없습니다
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(
"http://www.tumblr.com/api/authenticate");
try {
System.out.println("user name : "+Username);
System.out.println("password : "+Password);
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("email", Username));
nameValuePairs.add(new BasicNameValuePair("password", Password));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
System.out.println("response value : "+ response.toString());
System.out.println("response entity : "+response.getStatusLine().toString());
System.out.println(response.getStatusLine().getStatusCode());
if (response.getStatusLine().getStatusCode() != 200) {
return false;
}
// Save our list of available blogs.
SharedPreferences blogs = this.context.getSharedPreferences(BLOGS_PREFS,
0);
Log.d("ttT", "attempting blog list extraction");
saveBlogList(response, blogs);
return true;
} catch (ClientProtocolException e) {
Log.d(TAG, "client proto exception", e);
} catch (IOException e) {
Log.d(TAG, "io exception", e);
}
return false;
를 사용하고있다 "response.getStatusLine을(). getStatusCode() 값은 404이다." plz 사람이 나를 인증하는 데 도움이.
를 참조하십시오. 그러므로 404 – njzk2