dirt simple retweeter with twibot
build a simple retweeter with twibot.
this requires twibot 0.1.4.
in ./config/bot.yml:
login: your_user_name
password: your_password
include_friends: true
in retweeter.rb:
require 'twibot'
# add people who request it via direct
message do |message, params|
twitter.friend(:add, message.sender.screen_name) if message.text =~ /^followme/
end
# retweet keyworded phrases from friends
tweet do |message, params|
if message.text =~ /#some_phrase_or_keyword/
post_tweet "RT:@#{message.user.screen_name} "+
"#{message.text.gsub(/#some_phrase_or_keyword/, '')}"
end
end
run with:
$ nohup ruby retweeter.rb &
Trackbacks
Use the following link to trackback from your own site:
http://ben.vandgrift.com/trackbacks?article_id=13
