This is Kim Asendorf’s IP Writer ported to Ruby for use in for Rails applications. IP Writer reads the IP address of a visitor to a website and tweets it. By default it will tweet to the IP Writer twitter account, although you may configure it to tweet from any account you have access to.
Include IPWriter in your Gemfile:
Using IPWriter is simple. Just include the
ip_writer method anywhere in a controller.
class HomeController < ApplicationController def index ip_writer ...... end end
Tweet from any account
You can tweet from any account by passing your Twitter consumer and OAuth keys to IPWriter.
class HomeController < ApplicationController def index ip_writer(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET) ...... end end