Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

Twitter4R 0.2.0: Twitter API for Ruby

By Hendy Irawan / July 17, 2007

Twitter4R is a Ruby library to access Twitter API functionality developed by Susan Potter. Twitter itself is sort of social network with a differentiation: it allows you to send to and receive updates from your friends instantly.

The recently released major upgrade Twitter4R 0.2.0 offers significant improvements:

  • 100% coverage of official Twitter REST API
  • RSpec specifications with 100% code coverage
  • Cleaning and removal of previously inconsistent API

Here's a simplified example Twitter4R usage:

gem('twitter4r', '>=0.2.0')
require('twitter')

client = Twitter::Client.new(:login => 'mylogin',
  :password => 'mypassword')
new_message = client.message(:post,
  'I am addicted to Twitter', 'myfriendslogin')

To install it:

gem install twitter4r

Note: As an alternative, Twitter gem, as covered previously at Ruby Inside, is also available.

About Hendy Irawan

Ruby programmer from Indonesia. View all posts by Hendy Irawan →

Other Posts to Enjoy

Twitter Mentions