nst/STTwitter

How to check if already logged In

Closed this issue · 1 comments

Hello @nst

I am using your library in my iOS application.
I am able to integrate it easily, but I did not see any method or property which helps me to know "Is already logged In".
So that I could avoid the re-login?

Any suggestion how can I achieve this using your library?

nst commented

You can use the following method:

-[STTwitterAPI getAccountVerifyCredentialsWithSuccessBlock:errorBlock:]

https://github.com/nst/STTwitter/blob/master/STTwitter/STTwitterAPI.h#L922-L923

You'll get either an HTTP status 200 or 401.