On Nov 4, 8:18 pm, dowhilesomething <[EMAIL PROTECTED]>
wrote:
> Is this possible?  Everything I try to do comes out as text.

It works fine, as long as it recognises its a url.
(I assume it uses the Rails "auto_link", or something of that sort -
http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M001338)

namely start the link with an "http://";

I wrote a bit of code to tinyurl any links

""" ruby
def self.make_tinyurl(link)
  url = URI.parse('http://tinyurl.com/api-create.php')
  req = Net::HTTP::Post.new(url.path)
  req.set_form_data('url' => link)
  res = Net::HTTP.new(url.host, url.port).start {|http|
http.request(req) }

  return res.body
end
"""
http://github.com/matthewrudy/rudebay/tree/master/lib/rudebay/twitterer.rb

enjoy.
(apologies if I sent this twice)

MatthewRudy

Reply via email to