Displaying a Twitter feed

Posted on

In these tutorials I show how to display a Twitter feed via the Twitter API, then cache the output with fragment caching.

You can find all the code behind this tutorial in the GitHub Repo.


Here are the main gems I used:

  • twitter - The Ruby interface we used to talk to the Twitter API.
  • dotenv-rails - We used this gem to load up our consumer key and secret into our app, so we can access them via ENV['TWITTER_CONSUMER_KEY'].

This was written by Mike Rogers, a freelance Ruby on Rails developer based in London.

Share the ♥ by sharing this!

If you want to discuss this post, feel free to tweet me (@MikeRogers0) or drop me an email. Any code samples unless stated otherwise are licensed under the The MIT License (MIT). Spotted a mistake? Send me a pull request :)