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 … after registering application save consumer key and consumer secret.

$to = new TwitterOAuth($consumer_key, $consumer_secret);

Twitter OAuth

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(‘’, array(), ‘GET’);

$content = $to->OAuthRequest(‘’, array(‘status’ => ‘Test OAuth update. #testoauth’), ‘POST’);Twitter - Redirecting you back to the application_1268502564768


2 Responses to 7 Simple Steps to create Twitter Application

  1. Anonymous says:

    I used to be just browsing every now and then but happened to be to read this post. I have to admit that i’m within the hand of luck today or else getting this excellent post to learn to read wouldn’t are already achievable personally, at the very least. Really appreciate your content.

  2. Anonymous says:

    I love your website, blogs important. I’ll bookmark it and come back soon.

Leave a Reply