No commit activity in last 3 years
No release in over 3 years
A thin, woefully inadequate wrapper around http://twitter4j.org/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 1.8
 Project Readme

Twitter4j4r

A thin, woefully inadequate wrapper around twitter4j forked from tobias. It will only work under JRuby.

Installation

Add this line to your application's Gemfile:

gem 'incomplete-twitter4j4r'

And then execute:

$ bundle

Or install it yourself as:

$ gem install incomplete-twitter4j4r

Usage

Create a configuration object and a client:

config = Twitter4j4r::Config.new
config.consumer_key         = 'ABC456'
config.consumer_secret      = 'ABC456'
config.access_token         = 'ABC456'
config.access_token_secret  = 'ABC456'

client = Twitter4j4r::Client.new config 

To access the sample stream:

stream = client.add_stream :insert_stream_name_here

stream.sample do |tweet|
  puts "#{tweet.user.screen_name} says \"#{tweet.text}\""
end

Tracking a keyword:

stream = client.add_stream :insert_stream_name_here

stream.track('bieber') do |tweet|
  puts "#{tweet.user.screen_name} says #{tweet.text}"
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Thanks to Tobias Crawley for the original codebase.