Hopefully, you're all running on Twitter's API v1.1 now, as explained in the previous post.
Ok, right. So now to start things off, you will need to head over to the Developers section of Twitter and at the top click the "Sign In" option. Enter your login details as they are for Twitter normally, then you will need to authorise Twitter's Development page to allow you to continue, then once you've authorised it, you will be able to create your first application.
Once everything is authorised, you will be sent back to the front page of the developers section. Up in the top right corner you'll see your twitter display picture. Hover your mouse over it and select "My applications".
You will be brought to a page which lists your current applications - obviously most of you won't have anything here, but that will soon change. Click the blue button titled "Create a new application" and you will taken to a page where you can put your applications details in.
For the sake of this tutorial/series, we'll just create a test application and as you can see from the screenshot above, only Name, Description and Website are needed. We won't be using the Callback URL yet in this tutorial. Once you've filled out the relevant details, scroll down, read the "Rules of the Road" and check "Agree" if you do agree, then fill out the CAPTCHA and hit the "Create your Twitter application" button.
Boom! Your first application is set up and ready to use! Well, almost...
Now before we get to actually playing with the application, we first need to sort some of its options out, so click the "Settings" tab just above your applications name. Scroll down just underneath the Application Icon bit and you'll see Application Type. This is by default just set to "Read" (which means your application at the moment can only read public tweets), we will change this to the second option, "Read and Write" (which will read public tweets, but also allow YOU to post tweets). After selecting the "Read and Write" option, scroll down and click "Update this Twitter application's settings".
Almost there... we now need to get security keys for your application. To allow maximum security within your Twitter application, there's four different keys that are needed; Consumer key, Consumer secret, Access token and Access secret. The "secret" values should NOT be shared with anyone, otherwise your application can be compromised. At first, when you set up your application, you are only given the Consumer key and Consumer secret, but to continue, we will need the Access token and secret, which you can get them by clicking the "Details" tab (beneath your applications name and then scroll to the bottom where you'll see a button that says "Create my access token". Click that and you'll be notified that your keys have been made.
To view these keys, which we'll need in a minute, click the "OAuth tool" tab and you will see four seperate boxes filled with long strings of mumbled text, numbers and symbols. These are your keys which are very important to your application working.
Now that's all setup and ready to go, in the next tutorial, you will use your application to tweet "Hello World" from your account.
Current Directory Structure
+ Root Folder + twitteroauth - OAuth.php - twitteroauth.php