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 ‘http://twitter4r.rubyforge.org’. 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:


require('rubygems')
gem('twitter4r', '>=0.2.1')
require('twitter')

Twitter::Client.configure do |conf|
  conf.source = 'mysourceidfromtwitter'
end
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

5 Comments

  1. solo |

    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. Ryan |

    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:

    http://twitter.com/statuses/replies.format

    Thanks again!

     
  4. S. Potter |

    @Ryan: yes, someone recently mentioned that it was missing. I believe Twitter.com 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:
    http://groups.google.com/group/twitter4r-users/browse_thread/thread/01f7b18f1691e273#

    Below is also the discussion of replies feature request in Twitter4R, if interested:
    http://groups.google.com/group/twitter4r-users/browse_thread/thread/7ea00ad63751d738#

     
  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