Persistent token for keeping user account of my website


hi. I practice to keep user account without re-auth on my website
site config is that

  1. php version : 5.3.0+
  2. mysql : 5+
  3. session keep type
  • $s_lifetime = 606024*30;
  • session_set_cookie_params($s_lifetime, “/”, _DOMAIN, false, true);
  1. twitter Oauth version : 1.0

In above situation If i login to my website with twitter and close explorer, may after about 30miniute, open explorer go to my website
i guess session is alive, but its not(status is logout).

so… I want to make user account keep time to no limit or my limit(30day or another)
so. anybody let me know that?
please help me~!


The best way to persist access tokens is to store them in a database. When a user returns to your site, get the access token from the database and use it to make API calls on their behalf.