nst / STTwitter

A stable, mature and comprehensive Objective-C library for Twitter REST API 1.1
BSD 3-Clause "New" or "Revised" License
999 stars 161 forks source link

How to check if already logged In #216

Closed kamarshad closed 9 years ago

kamarshad commented 9 years ago

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 9 years ago

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.