First you have to download oAuth from github
“An open protocol to allow secure API authorization in a simple and standard method from desktop and web applications.”
7 Simple Steps to create Twitter Application using Twitter’s OAuth….
1. Build TwitterOAuth object
Login to twitter and register a new application here https://twitter.com/oauth_clients … after registering application save consumer key and consumer secret.
$to = new TwitterOAuth($consumer_key, $consumer_secret);
2. Request tokens from twitter
$tok = $to->getRequestToken();
3. Build authorize URL
$request_link = $to->getAuthorizeURL($token);
4. Send user to Twitter’s authorize URL
5. Get access tokens from twitter
$tok = $to->getAccessToken();
6. Rebuild TwitterOAuth object
$to = new TwitterOAuth($consumer_key, $consumer_secret, $user_access_key, $user_access_secret);
7. Query Twitter API with new access tokens
$content = $to->OAuthRequest(‘https://twitter.com/account/verify_credentials.xml’, array(), ‘GET’);
$content = $to->OAuthRequest(‘https://twitter.com/statuses/update.xml’, array(‘status’ => ‘Test OAuth update. #testoauth’), ‘POST’);
Source:
https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4
http://wiki.github.com/abraham/twitteroauth/links