jtwitter permission issue Android

457 Views Asked by At

I'm tryin to tweet a simple post from my Android application. I followed a (tutorial and the login works fine. Now when I try to tweet my Logcat says I don't have the rights to post something. I read something about OAuthProvider and follow a couple tutorials of that but without succes. Anyone got an idea?

Thanks

Code: Twitter jtwit = new Twitter(user_name, pswd); jtwit.setStatus("test");

Log: 03-29 13:52:02.724: ERROR/AndroidRuntime(1341): FATAL EXCEPTION: main 03-29 13:52:02.724: ERROR/AndroidRuntime(1341): java.lang.RuntimeException: Unable to start activity ComponentInfo{Adforce.files/Adforce.files.twitterConnection}: winterwell.jtwitter.TwitterException$UpdateToOAuth: You need to switch to OAuth. Twitter no longer support basic authentication.

2

There are 2 best solutions below

0
On

You need to make a OAuthSignpostClient, then get the user to authenticate it, and then use

Twitter jtwit = new Twitter(userName, myOAuthClient);

1
On

Your exception says itself:

You need to switch to OAuth. Twitter no longer support basic authentication.

I suppose twitter has now stopped support for basic authentication and you might look at Twitter OAuth