I have installed Twitter on my device and entered my user credentials(ie; I've already logged into Twitter). I would like to create an app which asks me my credentials only if I have not logged into Twitter on my device/emulator. If I have logged in already it should by pass asking me my user credentials. I would like to know if there is any way in which this can be done. Could you please help me in this aspect?

Thank you.

1

There are 1 best solutions below

0
On

I don't have any prior experience with Twitter and I don't know if Twitter allows this, but here's an idea worth investigating:

I'm assuming that after successfully logging in, Twitter should return an authentication token. You should find the location where Twitter saves this token on your phone. Then, when you want to login from your personal application, make use of that token. If the token will be valid (not expired) you will authenticate without the need to enter username/password, otherwise you'll need to enter username and password, and as a consequence update the token.

This is just an idea, maybe there's a easier way to achieve this...