7 Simple Steps to create Twitter Application

13 Mar

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



Tags: , , ,

4 responses to “7 Simple Steps to create Twitter Application

  1. Abraham Williams

    March 15, 2010 at 5:06 pm

    Cool. I’ve added this post to my community howtos page:

  2. laboratory technician

    December 3, 2010 at 1:55 pm

    Thank you, I have recently been searching for information about this topic for ages and yours is the best I have discovered so far.

  3. Medical Billing

    December 12, 2010 at 9:09 pm

    this post is very usefull thx!

  4. How To Fix Xbox Freezing

    March 17, 2011 at 3:35 pm

    Hello webmaster I like your post.. Such a type of blog post will definitely click to numerous viewers. A good article and useful for its written content. Many thanks for sharing it up! pleasing more please outstanding.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: