One of the reasons why Twitter is so popular, and became what it is today, is due to its App integration abilities through API. This post will show how to create and setup a Twitter App to be able to use Twitter’s API.
Why would you need to do this?
Without going into too much details, the API (application programming interface) is the interface (I) between a programmed request (P) and Twitter (A). Twitter processes these requests through its Apps infrastructure. In other words, by using the correct information, requests can be send to Twitter through for example a programming language (e.g. Python) to post something and/or to send some data back. This request will be send to an App and the App will process the request.
Various programming platforms can be used for the programming side of the Twitter API which does not fall into the scope of this post. Twitter App settings to access the API will however show how to create and set up a Twitter App and how to obtain the correct information to be able to send requests to it.
A Twitter App is not actually an App per se, but basically a bunch of settings to obtain the required information to use Twitter’s API.
In order to create a Twitter App, a mobile phone needs to be added to the Twitter profile. See this link for more information.
Multiple Apps can be created per Twitter account.
Creating an App on Twitter
Start off by logging into the Twitter account the App is to be created for. Multiple Apps can be created per Twitter account.
Next, open the Twitter Application Manager. Click on the Create New App button and complete only the required fields (i.e. leave the Callback URL empty) and click on the Create your Twitter Application button.
As is the case with some other social media App Managers, the Name of the App does not show up anywhere on the Tweet.
Twitter App configuration
After seeing “Your application has been created. Please take a moment to review and adjust your application’s settings” do the following:
By default, all App’s access levels are read-only. To post to Twitter, write permissions will be required. Go to the Permissions tab and choose Read and Write access before clicking on the Update Settings button. The permission settings may take a moment to reflect.
Access tokens and keys are needed to access a Twitter account without having to supply usernames and passwords. Go to the Keys and Access Tokens tab. At the bottom, under Your Access Token there will be no authorised applications for the account yet. Click Create my access token. An access token will be generated. It will be assigned to the application’s current permission level and should be updated each time the permission has been changed.
After the access token has been created all the following strings will be available:
- Consumer Key (API Key)
- Consumer Secret (API Secret)
- Access Token
- Access Token Secret