Twitter command-line client
Twitter is the hottest micro-blogging platform, as well as the latest buzz word for online social media now. We can use Twitter API to read tweets on our timeline from the command line!
Let's see how to do it.
Getting ready
Recently, Twitter stopped allowing people to log in using plain HTTP Authentication, so we must use OAuth to authenticate ourselves. A full explanation of OAuth is out of the scope of this book, so we will use a library which makes it easy to use OAuth from Bash scripts. Perform the following steps:
- Download the
bash-oauthlibrary from https://github.com/livibetter/bash-oauth/archive/master.zip, and unzip it to any directory. - Go to that directory and then inside the subdirectory
bash-oauth-master, runmake install-allas root. - Go to https://apps.twitter.com/ and register a new app. This will make it possible to use OAuth.
- After registering the new app, go to your app's settings and change
Access typetoRead and Write. - Now, go to the
Detailssection...