Twitter4R v0.2.1 Released

Written on 10:30:00 AM by S. Potter

To install/update Ruby gem use: sudo gem install twitter4r OR sudo gem update twitter4r Note: It may take some hours before the Rubyforge mirrors are in sync. The ‘source’ feature was added to Twitter v0.2.1 such that in the web interface Twitter users can see which application the messages were sent from. The default is ‘twitter4r’ with link ‘’. You can change this, but you will also need to contact Twitter developers (not Twitter4R) to set it up for you on the server side. To set relevant client configuration in Twitter4R you can do the following:

gem('twitter4r', '>=0.2.1')

Twitter::Client.configure do |conf|
  conf.source = 'mysourceidfromtwitter'
Remember you will need to contact the Twitter developers to setup a source id and url with them before the above code snippet will start working. Enjoy!

If you enjoyed this post Subscribe to our feed


  1. Unknown |

    Just did a "gem install twitter4r", and got version 0.2.2. In using it, I found a bug: Line 86 of model.rb should start out "respond_to?(:text)", instead of "respond_to(:text)"

    Thanks for your great work on this library!

  2. S. Potter |

    Thanks for reporting the defect. I've created a new ticket on the Twitter4R Retrospectiva site #30, so you can follow the progess of that there.

  3. Anonymous |

    Great library, tremendously easy to get up and running with, thank you!

    I thought I saw something int he 0.2.0 release notes about getting replies, but don't see anything in the latest 0.3.0 version for that. Any plans to include that? Or, maybe I'm missing it. Here's the API url:

    Thanks again!

  4. S. Potter |

    @Ryan: yes, someone recently mentioned that it was missing. I believe developers add that to the official Twitter API docs after the 0.2.x releases and I didn't see the new item there when I worked on the 0.3.0 release as I just used visual inspection of the document to find new items.

    The replies feature will be in Twitter4R 0.3.1, however, in the meantime you can use a temporary patch that will give you the same functionality as the 0.3.1 features in your 0.3.0 application that will be future compatible. See the following discussion for more information:

    Below is also the discussion of replies feature request in Twitter4R, if interested:

  5. S. Potter |

    Sorry if you can read the links here they are again:
    replies feature background and temporary Twitter4R 0.3.0 replies patch.


Post a Comment