0

Android twitter Trying the following tutorial for Oauth based authentication and updating user status.

http://www.androidsdkforum.com/android-sdk-development/3-oauth-twitter.html

When i run It has successfully authenticate but when it tries to update the status following error occur.

"twitter4j.TwitterException: SSL handshake failure: Failure in SSL library, usually a protocol error error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol (external/openssl/ssl/s23_clnt.c:585 0xaf589f78:0x00000000)"

any idea whats goin wrong ?

d-man
  • 57,473
  • 85
  • 212
  • 296

2 Answers2

0

When i run this app on emulator i am using internet and behind proxy and thats why it is throwing exception, when i use direct connection it works fine, some thing bad with proxy i guess.

d-man
  • 57,473
  • 85
  • 212
  • 296
0

You can use the below mentioned code to access network behind proxy using Emulator.

client = getHttpClient();
client.getCredentialsProvider().setCredentials(
      new AuthScope(null, -1, null), 
      new UsernamePasswordCredentials("Username", "Password"));
HttpHost httpproxy = new HttpHost("hostname", "portname", "http");
client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, httpproxy);
Guido
  • 46,642
  • 28
  • 120
  • 174
Amit Chintawar
  • 20,450
  • 1
  • 17
  • 17