This post originally appeared on Newswire.ca
Twitter has established itself as a cornerstone of online social media networks – its impact on the modern day internet is undeniable. However, what we normally see when we use twitter – ie. the readable text of a tweet – only scratches the surface of the data encapsulated in the service.
This image from a year ago posted by Raffi Krikorian, Engineering Manager, Application Services at Twitter, illustrates the massive amounts of hidden data packed within every tweet.
Much of this information is metadata about the user of the tweet, with tasty morsels of stats such as “statuses_count” (number of tweets), “friends_count” (number of users they are following”), and “followers_count” (number of followers) among them.
I’ll show you how to access this information using the Twitter API (application programming interface) – which allows computers to interact with twitter without using the twitter website.
Let’s get acquainted with the Twitter API. The API is able to perform almost every action that a regular user can – for example: view a person’s profile, write a tweet, and examine friends and followers. The easiest way to understand the API is to use Twitter’s excellent development console, available at http://dev.twitter.com/console
The console is separated into 2 panes. On the top is the “command line”, and on the left is a list of tabs that separate out different parts of twitter functionality. The right pane shows the result of a “query” into the twitter system. You click on functions on the left pane, edit the command line to specify details, and read the results on the right.
In this example, I selected the User/Show function. I edited the screen name on the command line to show the user details for the CNWGroup twitter account, and on the right pane are the details, in a computer readable format known as json. I’ve highlighted in yellow the critical controls in the image below.
There is a share button to let you take a snapshot of the query.
The console is great for exploring what’s possible with the Twitter API. Some of the most useful functions are in the User, Friends and Followers, and Timeline tabs. For some functions, you will need to log in by clicking on the lock icon to the left of the command line.
To read further, visit http://dev.twitter.com/doc and go through the list of resources. It can get a bit technical, but the development console is always available for you to try out the commands.
For more advanced usage, you can chain together different commands via an intermediary like a spreadsheet or a simple program. For example, you can get a complete list of followers for a given account and then sort them according to certain criteria, such as whether the words “social media” appear in the follower’s profile description. After that, you can program twitter to perform actions on those followers, such as put them into a list.