I’m building a twitter application in PHP/CodeIgniter which gets an [access_token] back successfully. At the moment, I’m not writing anything to the database as I am still in testing.
But how do you determine that user is simply returning back if the user already logged in at a earlier time (meaning they did not explicitly press log out)? What do you need to store in db? Because storing everything in SESSION will obviously result in user needing to login everytime if he/she closes your website..Just trying to get some clarification!
thanks.
When you call oauth/access_token you get the access token back (this is a last oAuth token – there is several in the authentication process, but this is the one you use to make calls).
Save this token and the secret in a session and it should last “forever”.
When a user returns, you can verify the token is still valid with “Verify credentials” https://dev.twitter.com/docs/api/1.1/get/account/verify_credentials