1. Visit the Twitter Developers Site
The first thing you need to do is head on down to dev.twitter.com. In order to create an account, all you need to do is click on the “Sign In” link at the top right.
2. Sign in with your Twitter Account
Next, sign in with the Twitter account you want to associate with your app. You do have a Twitter account don’t you?!
3. Go to “My Applications”
Once you’re logged in, click on the downwards arrow to the right of your Twitter image and select “My Applications”. This is where all your registered Twitter apps will appear.
4. Create a New Application
If you are new to the Developers site you won’t see any applications registered. Either way, it’s time to create our first application. To do this, click on the big “Create a new application” button.
5. Fill in your Application Details
Put your website in the website field- don’t worry that it isn’t (as Twitter ask) your application’s publicly accessible home page. However, this website will be where your app is hosted.
For now ignore the Callback URL field. If you are allowing users to log into your app to authenticate themselves, you’d enter the URL where they would be returned after they’ve given permission to Twitter to use your app.
Once you’ve done this, make sure you’ve read the “Developer Rules Of The Road” blurb, check the “Yes, I agree” box, fill in the CAPTCHA (don’t you just love them) and click the “create your Twitter Application” button. Hurrah!
6. Create Your Access Token
You’ll then be presented with lots of information, but we’re not quite done yet. We now need to authorize the Twitter app for your Twitter account. To do this, click the “Create my access token” button. This takes a few seconds, so if you don’t see the access tokens on the next screen, you may have to refresh the page a few times.
If you change the app permissions at any future point a new auth token will need to be generated to reflect the permissions change.
7. Choose what Access Type You Need
Change application type to ‘Read & Write’ to give the application permission to follow other accounts on your behalf. This will require that you verify your mobile phone within your twitter account.
8. Make a note of your OAuth Settings
Once you’ve done this, make a note of your OAuth settings.
It goes without saying that you should keep these secret. If anyone was to get these keys, they could effectively access your Twitter account.