Comments on: Simple Ruby Twitter Client – Tweet [Ruby] https://sheepguardingllama.com/2008/10/simple-ruby-twitter-client-tweet-ruby/ Scott Alan Miller :: A Life Online Mon, 27 Dec 2010 05:23:24 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: Joshua Born https://sheepguardingllama.com/2008/10/simple-ruby-twitter-client-tweet-ruby/comment-page-1/#comment-23428 Mon, 27 Dec 2010 05:23:24 +0000 http://www.sheepguardingllama.com/?p=2833#comment-23428 Nice article.

Regarding the username and password hardcoding in the script. It isn’t that hard to use OAuth so that you don’t have to leave your Twitter username and password in a script or in environmental variables.

I go over tweeting in Ruby with OAuth in my blog article: http://joshuaborn.info/blog/dc7a

]]>
By: rkumar https://sheepguardingllama.com/2008/10/simple-ruby-twitter-client-tweet-ruby/comment-page-1/#comment-21862 Fri, 19 Dec 2008 07:24:14 +0000 http://www.sheepguardingllama.com/?p=2833#comment-21862 One of 2 tiny changes, if you don’t mind:

text = ARGV[0] && ARGV[0].chomp

if text.nil? or text.length <= 0
puts “Please enter text to post.”
text = ARGF.readline
end

thanks!

]]>
By: rkumar https://sheepguardingllama.com/2008/10/simple-ruby-twitter-client-tweet-ruby/comment-page-1/#comment-21861 Fri, 19 Dec 2008 07:00:27 +0000 http://www.sheepguardingllama.com/?p=2833#comment-21861 Hi

Line 4 chomp gives error if no arg passed, so won’t reach later line checking text length <=0 .

I’ll probably put in a read there to take input if no arg provided.

Nice script.
rahul

]]>