Written on 10:30:00 AM by S. Potter
To install/update Ruby gem use:
sudo gem install twitter4r
sudo gem update twitter4r
Note: It may take some hours before the Rubyforge mirrors are in sync.
The ‘source’ feature was added to Twitter v0.2.1 such that in the web interface Twitter users can see which application the messages were sent from. The default is ‘twitter4r’ with link ‘http://twitter4r.rubyforge.org’. You can change this, but you will also need to contact Twitter developers (not Twitter4R) to set it up for you on the server side. To set relevant client configuration in Twitter4R you can do the following:
Remember you will need to contact the Twitter developers to setup a source id and url with them before the above code snippet will start working. Enjoy! If you enjoyed this post Subscribe to our feed
require('rubygems') gem('twitter4r', '>=0.2.1') require('twitter') Twitter::Client.configure do |conf| conf.source = 'mysourceidfromtwitter' end