jtwitter permission issue Android
I'm tryin to tweet a simple post from my Android application. I fo开发者_如何学Pythonllowed 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.
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
You need to make a OAuthSignpostClient, then get the user to authenticate it, and then use
Twitter jtwit = new Twitter(userName, myOAuthClient);
精彩评论