Skip to content

Instantly share code, notes, and snippets.

@sween
Created June 1, 2009 02:05
Show Gist options
  • Save sween/121135 to your computer and use it in GitHub Desktop.
Save sween/121135 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'twitter'
require 'htmlentities'
require 'optparse'
require 'ostruct'
require 'shorturl'
def self.arstweet(title,author,teachingfileurl)
httpauth = Twitter::HTTPAuth.new("arsteach", "")
base = Twitter::Base.new(httpauth)
yurl = ShortURL.shorten("#{teachingfileurl}")
# puts yurl
base.update("#{title}, by #{author}, #{yurl} has been posted.")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment