I am attempting to automatically login to twitter using the OAUTH and php. I have successfully created the connection and can login / tweet successfully using the following code:
$connection = new TwitterOAuth(
'consumer_key',
'consumer_secre开发者_高级运维t',
'oauth_token',
'oauth_token_secret'
);
$credentials = $connection->get('account/verify_credentials');
echo "Connected as @" . $credentials->screen_name;
$connection->post('statuses/update', array('status' => 'ello world'));
However, instead of tweeting I would like to redirect the user to twitter.com
, and have them already logged in.
Is there something within the API that can allow me to do this?
There is no way to log a user into twitter.com with an OAuth access token. The only way a user can get an authenticated session with twitter.com is by submitting the login form with their username/password.
精彩评论