android - jtwitter authetication error ,credentials same working on twitter.com -


i getting following authertication error when post on app.

10-07 15:36:54.265: e/androidruntime(2537): fatal exception: thread-199 10-07 15:36:54.265: e/androidruntime(2537): winterwell.jtwitter.twitterexception$e401: code 215: bad authentication data 10-07 15:36:54.265: e/androidruntime(2537):     @ winterwell.jtwitter.urlconnectionhttpclient.processerror(urlconnectionhttpclient.java:483) 10-07 15:36:54.265: e/androidruntime(2537):     @ winterwell.jtwitter.urlconnectionhttpclient.post2_connect(urlconnectionhttpclient.java:413) 10-07 15:36:54.265: e/androidruntime(2537):     @ winterwell.jtwitter.urlconnectionhttpclient.post2(urlconnectionhttpclient.java:379) 10-07 15:36:54.265: e/androidruntime(2537):     @ winterwell.jtwitter.urlconnectionhttpclient.post(urlconnectionhttpclient.java:348) 10-07 15:36:54.265: e/androidruntime(2537):     @ winterwell.jtwitter.twitter.updatestatus(twitter.java:2762) 10-07 15:36:54.265: e/androidruntime(2537):     @ winterwell.jtwitter.twitter.updatestatus(twitter.java:2694) 10-07 15:36:54.265: e/androidruntime(2537):     @ winterwell.jtwitter.twitter.setstatus(twitter.java:2482) 10-07 15:36:54.265: e/androidruntime(2537):     @ com.example.yamba.statusactivity$1.run(statusactivity.java:31) 

the credentials provided work , when try logon twitter.com webbrowser.

my code:

public void onclick(view v) {         final string statustext = editstatus.gettext().tostring();         new thread(){          public void run(){         twitter twitter = new twitter("username", "password");         twitter.setstatus(statustext);                        }       }.start();     } 

jtwitter version : 2.9.0

i'm afraid can't use username/password login twitter api. switched off couple of years ago.

you need use oauth instead -- there's documentation @ jtwitter webpage, or in javadoc.

nb: quote javadoc: username/password constructor "only non-twitter sites, such identi.ca."


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -