Displaying Tweets

The script bin/poll retrieves recent tweets containing a hashtag and displays them.

Step 1: Prerequisites

Twurl is a command-line tool (like curl) that is tailored for the Twitter API. From your Twitter developer account, you can get a consumer key and its secret key to make API requests with Twurl.

Setup Twurl following the Getting Started directions.

Step 2: Choose a Hashtag

Edit bin/poll with the hashtag you want to search for. I chose #stetr.


Step 3: Display Tweets

$ cd bin
$ ./poll

Tweets are retrieved at most every 5 seconds. If no recent tweets are found, a random message is displayed or the lights will all flash, indicating that the Demogorgon is nearby!