I'm using a JTwitter in my Android project and I found an issues, which I can't resolve. Basically, I have two buttons: Tweet, and Logout. What I was doing in Logout is just setting a tocken and a tocken secret to null. After this it asks me to Authorize my app again, but does not log me out. I didn't find any methods like "logout()" or something similar. Is it possible to log out from my Twitter acout using JTwitter? Is it a good or bad practice? If it is not possible, maybe Twitter4J has something better?
Asked
Active
Viewed 847 times
5
-
http://stackoverflow.com/questions/1960957/twitter-api-logout – hovanessyan Feb 08 '12 at 12:00
-
Thanks, anyway, I still don't know how to switch from 'authorize' to 'authenticate'... I use this code to set force_login: `HttpParameters params2 = new HttpParameters(); params2.put("force_login", "true"); mConsumer.setAdditionalParameters(params2); authUrl = mProvider.retrieveRequestToken(mConsumer, OAUTH_CALLBACK_URL);` – lomza Feb 08 '12 at 12:24
-
1as far as I understood, you cannot force logout on behalf of the user. – hovanessyan Feb 08 '12 at 13:15
-
It seems so. I changed to 'authenticate' and added 'force_login' and the first time it really asks if I want to Sign in, but later I just don't log in/log out anymore... – lomza Feb 08 '12 at 13:40
1 Answers
2
There is no logout for Twitter apps -- but you don't need one.
If you just discard the Twitter
object & the user's oauth access tokens, that's equivalent to logging out.

Daniel Winterstein
- 2,418
- 1
- 29
- 41