Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logout from twitter api android

I am trying to integrate my app to twitter and I do it

but my question is: How I can logout from twitter? can I remove RequestToken or OAuth of my app?

I tried to use:

  • twitter.setOAuthAccessToken(null);

but does not work

  • callbackUrl = "api.twitter.com/oauth/authorize?force_login=true";

also does not work

please help me

thanks in advance

like image 557
Mohammad Rababah Avatar asked Feb 10 '23 22:02

Mohammad Rababah


1 Answers

@Rob answer is working, but this methods was removed in Twitter SDK v3.0.0

According to upgrading guide:

[Removed] TwitterCore#logOut() was removed use TwitterCore.getInstance().getSessionManager().clearActiveSession() instead.

like image 173
Dima Rostopira Avatar answered Feb 13 '23 12:02

Dima Rostopira