second time auto login to twitter using oauth php

Posted by JAMES on Stack Overflow See other posts from Stack Overflow or by JAMES
Published on 2010-05-05T07:20:29Z Indexed on 2010/05/05 7:38 UTC
Read the original article Hit count: 163

Filed under:
|
|
|
|

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

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql