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
2
votes
2 answers

Instantiate multiple twitter accounts with Ruby on Rails twitter gem

I am using sferiks gem https://github.com/sferik/twitter I want to instantiate multiple accounts from within a loop. This is what I thought would work... twitter_accounts.each do |twitter_account| username = twitter_account['username'] token…
Max Rose-Collins
  • 1,904
  • 5
  • 26
  • 45
2
votes
2 answers

Get notifications using Twitter gem

I'm trying to get Twitter notifications using Twitter gem. I'm using the method notifications from Twitter::User but the value is always false even though I receive emails from Twitter about those new notifications : twitter =…
titibouboul
  • 1,348
  • 3
  • 16
  • 30
2
votes
2 answers

Twitter gem sample app with OAuth2

I'm trying to get my app to work with the twitter gem, but I can't seem to perform the authorization protocol using OAuth2. I'd like to know if there is a sample app available so I can see what I'm doing wrong. Thanks
Renan
  • 1,910
  • 4
  • 22
  • 36
2
votes
2 answers

Twitter gem - how to get the ID of a new tweet?

I am using the twitter gem to update a users status. However, I also need to know the ID of the recently created status so I can delete it later on. Any guidance here?
John R
  • 301
  • 3
  • 14
1
vote
1 answer

Which background process used for continous fetching of data from Twitter through ruby on rails application

My application need continous fetching of data from Twitter. I used twitter gem to access Twitter API. Have used #rufus-scheduler to hit the Twitter API after every half an hour, but it is not working, as some time it is blocked by the Twitter API…
1
vote
2 answers

How to identify authetication failure reason using omniauth-twitter gem

I'm using twitter + devise + omniauth + omniauth-twitter to autheticate users via twitter api. From my site I reach, twitter login. I give my twitter credentials. After that I'm redirected to callback url. But the response says the authetication…
robert
  • 8,459
  • 9
  • 45
  • 70
1
vote
1 answer

Twitter.search("query").user evaluating to Nil after deployment to Heroku

When using the Twitter gem. This works fine when I'm running it locally, but once I deploy it to Heroku, it's clear the the user object is coming back Nil. <% twit_search(search_val, coeff) do |r| %>

<% name = r.user[:screen_name]…

Joshua Clark
  • 1,346
  • 3
  • 14
  • 24
1
vote
1 answer

Event loop for Twitter4r

Is there an event loop for Twitter4R where when a user mentions the bot's handle, it will notify the bot? I have tried to make it work with checking client.mentions_timeline every 5 seconds to see if there are new tweets that are mentioning the…
Marry Jane
  • 71
  • 1
  • 8
1
vote
1 answer

Twitter Gem showing wrong created at Time

I have the following code, using the twitter gem in ruby on rails. It does not return the correct time for tweets created, although I have set my time zone in application.rb and have also set it here. It returns three hours ahead of the time the…
Frank Doe
  • 192
  • 1
  • 3
  • 17
1
vote
0 answers

Ruby Twitter Gem, checking the rate limits for a specific user

I am trying to get the x-rate-limit-remaining for a specific user using Twitter Gem. Here is my code : @client = Twitter::REST::Client.new do |config| config.consumer_key = "KEY" config.consumer_secret = "SECRET" config.access_token…
Eric
  • 95
  • 1
  • 8
1
vote
1 answer

how to get twitter analytics using twitter gem rails?

I want to get twitter analytics for tweets I posted using twitter gem in my ruby on rails application. Is there any possibility to achieve this ? I want to show tweet impression on my application,please let me know if there is any possible way .
1
vote
1 answer

video views count of a video posted to twitter

I need to access the video views count of a video posted to Twitter account through Twitter API console. Is it possible to get the video views count? I am using Twitter gem in rails to acces the metircs of posts done in Twitter. Please suggest!
1
vote
1 answer

Fetching retweet using twitter gem in ruby

I have been using twitter gem in ruby to fetch various attributes of a tweet. I have been successful in fetching all the attributes. However when i try to fetch retweet, it always gives me the value of 0. require 'twitter' geolocate =…
user1482084
  • 325
  • 1
  • 3
  • 10
1
vote
1 answer

Twitter Ruby API: How do I unfollow a person?

I wanted to know if there is any method known as Twitter::unfollow to unfollow a person using Twitter Ruby API. I have read the documentation provided on Github but it doesn't seem to help me with this issue.
1
vote
2 answers

how to display twitter user feed in rails with twitter gem

Im using the twitter gem for rails to try and show 3 statuses from my twitter feed. I'm doing everything as per the documentation but its not displaying anything in my view. In my application controller I've got this down: client =…
Terryfrancis
  • 135
  • 1
  • 12