From: Justin Collins Date: 2009-06-08T19:15:35+09:00 Subject: Re: [QUIZ] Twitter Personalities (#208) Daniel Moore wrote: > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > The three rules of Ruby Quiz: > > 1. Please do not post any solutions or spoiler discussion for this > quiz until 48 hours have elapsed from the time this message was > sent. > > 2. Support Ruby Quiz by submitting ideas and responses > as often as you can! > Visit: http://rubyquiz.strd6.com/suggestions > > 3. Enjoy! > > Suggestion: A [QUIZ] in the subject of emails about the problem > helps everyone on Ruby Talk follow the discussion. Please reply to > the original quiz message, if you can. > > RSS Feed: http://rubyquiz.strd6.com/quizzes.rss > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > ## Twitter Personalities (#208) > > Merhaba Rubyists, > > This week's quiz is to create a program that will generate messages > 140 characters in length. There primary use will be to create a > Twitter "personality". At the end of the quiz period these > "personalities" will be unleashed on the internet and we'll see how > they do in the wild. > > The programs will consist of two parts: a component for interacting > with Twitter, and a top secret "personality" module. > > For the Twitter interface component there will be no no-spoiler > period. Please feel encouraged to discuss different libraries or > methods on the mailing list. Let's all work together to find the best > interface. > > The "personality" component can take any inputs and will produce a 140 > character message when called. The "personality" may remember state. > The no-spoiler period applies for the "personality" component; please > save them until everyone has had a chance to consider their own > implementations. > > > Have Fun! > Posting to Twitter, I found, was pretty straightforward using the Twitter4r gem, although it only worked for me under Ruby 1.9: require 'twitter' client = Twitter::Client.new :login => "myname", :password => "mypassword" client.status :post, "Working on Ruby Quiz." I hope that helps anyone who might have been hesitant because of the Twitter interface part. -Justin