Questions tagged [twitter-gem]

A Ruby wrapper for the Twitter API.

Provides a wrapper to the Twitter API. To install, grab the gem:

gem install twitter

Resources

See also

90 questions
1
vote
3 answers

Twitter api says rate limit is 180 (by user-auth), but using twitter gem restrict to 15 calls only

I am using twitter gem to interact with twitter APIs. I am using single user authentication (not application only authentication) as shown here https://github.com/sferik/twitter/blob/master/examples/Configuration.md#single-user-authentication I have…
JVK
  • 3,782
  • 8
  • 43
  • 67
1
vote
1 answer

How can I mock twitter streaming client calls within rspec?

Using rspec and the twitter gem https://github.com/sferik/twitter I am trying to find a solution to mock a twitter stream ideally with a mechanism like VCR. Obviously VCR does not work on tcp socket connections only http requests. If this is too…
Viktor Trón
  • 8,774
  • 4
  • 45
  • 48
1
vote
1 answer

Understanding Rails/Twitter On-click tweet on behalf of user

As preface, I've followed through some tutorials (i.e. Michael Hartl's) though I'm still fairly novice. Forgive any cloudy terminology. I am trying to build a simple application in Rails 4 that does the following: User logs into application…
kennet
  • 13
  • 3
1
vote
0 answers

TooManyRequests Twitter Gem

I am facing a strange TooManyRequests error. it is strange because when I use rails console and request for example [list_timeline(40906334)] more than 15 times < 180 times it works without the error. however, when I do the same thing from the…
Abdulaziz Alsubaie
  • 710
  • 2
  • 8
  • 17
1
vote
2 answers

Rails twitter gem causing error Missing required parameter: status

I am using twitter gem with rails in order to retrive the user timeline and post an update: def index @tweets = Twitter.home_timeline end def tweet text = params[:text] Twitter.update(text) unless text = nil end The view which…
Wahtever
  • 3,597
  • 10
  • 44
  • 79
1
vote
1 answer

Return authenticated users favorites list with twitter gem

I'm looking at creating a project where I would like a user to login and then it will return all their tweets from a specific time duration. I have seen that it is possible using the twitter Api, but as I'm planning to use the twitter gem I would…
Sam Mason
  • 1,037
  • 1
  • 8
  • 29
1
vote
0 answers

rails twitter gem for multiple users

using the twitter gem I want to get all the followers of the authenticated user. I only get the followers of the registered twitter id for the application though. I have a twitter.rb in the initializers which uses the consumer key/secret of the…
Rudi
  • 1,577
  • 3
  • 16
  • 42
1
vote
1 answer

Twitter gem - how to get the latitude and longitude of a tweet?

How to get the latitude and longitude of a tweet using the Twitter gem?
nadine1988
  • 167
  • 2
  • 10
0
votes
2 answers

Having difficulty with a search and follow, using twitter gem and ruby

So in PHP, this code works live, done months ago. $tweetsToSlippy = $connection->get('http://search.twitter.com/search.json', array('q' => $query, 'since_id' => $since_id))->results; foreach ($tweetsToSlippy as $tweet) { $user_id =…
Jim
  • 1,274
  • 1
  • 10
  • 15
0
votes
1 answer

twitter gem 2.0.2 ArgumentError

I just updated to rails 3.2 and twitter gem 2.0.2 Now when I start web server I get this message ArgumentError (wrong number of arguments (3 for 1)): twitter (2.0.2) lib/twitter.rb:10:in `new' lib/twitter.rb:10 content def new(options={}) …
jferrercas
  • 25
  • 1
  • 5
0
votes
1 answer

Troubleshooting searching with the Twitter ruby gem

I'm trying to do a search for a user's tweets with a specific hashtag, where the user's twitter handle is defined by the twitter attribute on the Profile model (@profile.twitter). Here is the action in my controller: def profile_twitter @profile =…
tvalent2
  • 4,959
  • 10
  • 45
  • 87
0
votes
1 answer

Twitter gem, Heroku, Internal server error

I haven't worked with the Twitter API before. I have a Sinatra application pushed to Heroku, which makes use of the Twitter gem. The only thing I do in the application (as far as Twitter is concerned) is to pull my 5 latest tweets. @tweets =…
Joris Ooms
  • 11,880
  • 17
  • 67
  • 124
0
votes
1 answer

Twitter Ruby Gem - get friends names and ids, nothing more

Is it possible to simply get the people you are following with just an id and full name? I do not need any of the additional data, it's a waste of bandwidth. Currently the only solution I have is: twitter_client = Twitter::Client.new friend_ids =…
randombits
  • 47,058
  • 76
  • 251
  • 433
0
votes
1 answer

Rescuing from Twitter Gem

I have a tweets_controller #called when user submits twitter form def message unless current_user session[:twitter_message] = params[:twitter_message] #sets the message from the form so it's available for send_tweet in…
Slick23
  • 5,827
  • 10
  • 41
  • 72
0
votes
1 answer

How to disconnect twitter gem from streaming inside Thread

I'm running a streaming connection with twitter gem inside a thread. I have been disconnecting by simply killing the thread and opening a new one. I have an overlap between the old and new threads so I don't miss anything (hopefully). But if I kill…
Rimian
  • 36,864
  • 16
  • 117
  • 117