I coded a login for Twitter, but I can't figure out how to log off. In my UI I have a Log Off
button which when clicked should trigger this log off. Please guide me in writing a log off method for this purpose.
Asked
Active
Viewed 1,221 times
0

Cœur
- 37,241
- 25
- 195
- 267

user946456
- 69
- 9
-
you need to provide whatever you are doing while login to twitter. Are you using SharedPreference to store username while successful login. then just clear the sharedPreference while logout. thats it. – Paresh Mayani Dec 26 '11 at 06:44
-
Yes I done like as you said but i didnt reach my requirement.My requirement is multiple persons login. Example:Take 2 users 1st user login in twitter after some time he logged then 2nd person want to login.okay so in this scenario our logic is not working. Tell me another solution with source code. – user946456 Dec 26 '11 at 07:11
-
demanding for source code is nice when if you have posted the code whatever you have tried. – Paresh Mayani Dec 26 '11 at 07:13
-
okay You are right.Other wise Tell me the solution.Thank you In advance – user946456 Dec 26 '11 at 07:17
-
Hi Paresh,I used remove Session Cookie () it works for me. But i have one doubt plz clear me. That is when i use this metohd remove Session Cookie () may it cause problem of other webveiw loading apps.pls clear my doubt – user946456 Dec 26 '11 at 08:33
-
1I dont think it is going to problem your other webview loading apps – Lucifer Dec 26 '11 at 08:38
-
yes you are right. I tested the application.it doesnt cause any problem – user946456 Dec 27 '11 at 06:45
1 Answers
0
For signout, I suggest you to close the session
object. So once your session
will finish & you will successfully Logout.

Lucifer
- 29,392
- 25
- 90
- 143
-
Yes I done like as you said but i didnt reach my requirement.My requirement is multiple persons login. Example:Take 2 users 1st user login in twitter after some time he logged then 2nd person want to login.okay so in this scenario our logic is not working. Tell me another solution with source code. Thank YOU in advance – user946456 Dec 26 '11 at 07:19
-
Here you need to track while login , that any other user has already logged in or not, if so the first logout that user & then do login process of second user. – Lucifer Dec 26 '11 at 07:58
-
I used remove Session Cookie () it works for me. But i have one doubt plz clear me. That is when i use this metohd remove Session Cookie () may it cause problem of other webveiw loading apps.pls clear my doubt – user946456 Dec 26 '11 at 08:34