second time auto login to twitter using oauth php
- by JAMES
Any can tell me how to second time auto connect with twitter from my site.
I did... the following CODE
if(empty($outh_key_db)){
$token=$_SESSION['oauth_token'] ;
$outh_secr_db=$_SESSION['oauth_token_secret'];
$con = mysql_connect("localhost","rathin","xxxxxxxxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_twtbook", $con);
mysql_query("UPDATE register SET outh_key = '".$token."', outh_secr='".$outh_secr_db."' WHERE userid='".$loguser_email."'");
mysql_close($con);
This code save the outh_token and outh_tk_secret to my DB.
But on second time log in to my site I passed the 'outh_token and outh_tk_secret' in session with username.
The oauth not authenticate that....
Kindly suggest me.... to make aouth connect to twitter using oauth...if user once(1st time made the) connect twitter