I use PHP Lib to support OAuth for Twitter's REST API http://github.com/abraham/twitteroauth
<?php
session_start();
require("config.php");
require("twitteroauth/twitteroauth.php");
if(!empty($_GET['oauth_verifier']) &&
!empty($_SESSION['oauth_token']) &&
!empty($_SESSION['oauth_token_secret'])
)
{
$twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);
$access_token = $twitteroauth->getAccessToken($_GET['oauth_verifier']);
$_SESSION['access_token'] = $access_token;
$user_info = $twitteroauth->get('account/verify_credentials');
// ?...
?>
How to get the twitter userpic? Thanks!