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

How to implement the search for the twitter APIs in controller as well as in Erb template?

I am new to Ruby on Rails as i want to develop a twitter app with the search option. Using which an user can search for the other users. I am using twitter gem and oauth gem for my project. I Have tried using below given code but its not working…
0
votes
1 answer

How do you iterate through Twitter gem user timeline?

Rails newbie. I'm writing an application that pulls a Twitter user timeline using the sferik Twitter gem, iterates through the timeline and writes each individual tweet into a model/table. I can get the user timeline into a hash but when I try and…
0
votes
1 answer

How do you fake twitter data from the twitter-gem?

I have a working script that uses the twitter gem in order to pull information from twitter. However I cannot find a way to fake this data for testing without actually calling out to twitter. Does anyone know of a way to mock this? I'd be up for…
SlowBucket
  • 167
  • 1
  • 1
  • 10
0
votes
1 answer

LoadError when 'require'-ing Twitter gem on Rails

I'm using Rails 4.0.1, Ruby 2.0, and running Windows. I tried 'require'-ing 'twitter' in one of my controller files: require 'rubygems' require 'twitter' class MyController < ApplicationController #etc I added 'twitter' to my Gemfile: gem…
Ruben Martinez Jr.
  • 3,199
  • 5
  • 42
  • 76
0
votes
1 answer

Twitter gem can't render links in tweets

Twitter gem can't render links in tweets. How do I render twitter links to view? for example link to @user or link to #tag View: <% @tweet_news.each do |tweet| %>
  • <%= l tweet.created_at %>

    <%= raw linkify(tweet.text)…

  • MicRum
    • 1,711
    • 2
    • 21
    • 23
    0
    votes
    2 answers

    Twitter::Error::Forbidden - Unable to verify your credentials

    I'm using devise + omniauth and I can connect to twitter api correctly. But when I try to use twitter gem, I have the following error in console : "Twitter::Error::Forbidden - Unable to verify your credentials" I have installed the gem and created…
    titibouboul
    • 1,348
    • 3
    • 16
    • 30
    0
    votes
    2 answers

    Pulling Images from User's Timeline with Twitter Gem

    I would like user's to be able to "choose" an image that they've previously uploaded via Twitter. I am using the Twitter Gem by Sferik, but after reading the documentation I haven't gotten much further. When I make a call to the authenticated…
    FloofyDoug
    • 53
    • 1
    • 6
    0
    votes
    0 answers

    Rate limit on rails console different than through rails app

    I'm seeing some strange behavior regarding Twitter rate limits. When I run the following code in my rails app (in an action in a controller), I often get the error: Twitter::Error::TooManyRequests. However, if I run the same code in the rails…
    readyornot
    • 2,783
    • 2
    • 19
    • 31
    0
    votes
    1 answer

    Do a rescue_from on Twitter::Error and still load view

    I want to catch a Twitter::Error that happens in a view partial and still load the page. Put another way, I don't want a Twitter::Error to stop the page from loading. I just want that partial to not be…
    Scott Magdalein
    • 361
    • 1
    • 3
    • 13
    0
    votes
    1 answer

    Catching errors with Ruby Twitter gem, caching methods using delayed_job: What am I doing wrong?

    What I'm doing I'm using the twitter gem (a Ruby wrapper for the Twitter API) in my app, which is run on Heroku. I use Heroku's Scheduler to periodically run caching tasks that use the twitter gem to, for example, update the list of retweets for a…
    JoshDoody
    • 417
    • 1
    • 4
    • 14
    0
    votes
    2 answers

    twitter gem not loaded after bundle install

    I am new to rails and I am trying to make an app using twitter gem. This is my gemfile: gem "twitter", "~> 4.6.2" gem "faraday", "~> 0.8" gem "multi_json", "~> 1" gem "simple_oauth", "~> 0.2.0" and I ve made bundle install, but I still get error…
    Chris_Ch
    • 7
    • 2
    0
    votes
    1 answer

    Why am I getting "Too many terms specified in query" for calls within the Twitter API 100-user limitation?

    I'm using list/members/create_all and list/members/destroy_all which both claim a limitation of 100 users per call. I limit my calls to 90 users, but I still intermittently receive a Too many terms specified in query error ... I'll even…
    James Chevalier
    • 10,604
    • 5
    • 48
    • 74
    0
    votes
    2 answers

    Ruby / Twitter Gem. Twitter::Error::NotFound

    Happy holidays! With the Twitter gem, I occasionally get this error when doing a lookup on a batch of ids. Is there a way to know which of the ids weren't found, and which were?
    Mr. Demetrius Michael
    • 2,326
    • 5
    • 28
    • 40
    0
    votes
    1 answer

    Configuring twitter gem version 3 with apigee

    I was using version 2 of twitter gem in combination with apigee by setting: Twitter.gateway = 'myapp-myapigee.apiggeee.com' In version 3, support for API gateways via gateway configuration is removed. Any pointers along the lines of implementing a…
    maiaini
    • 692
    • 1
    • 9
    • 13
    0
    votes
    1 answer

    Twitter gem: bad URI?

    I updated my Twitter gem today and the Twitter.user_timeline("some_user") no longer works. I get: URI::InvalidURIError: bad URI(is not URI?): https://api.twitter.com/1/statuses/user_timeline.json?screen_name=dalailama But when I plug that into my…
    bevanb
    • 8,201
    • 10
    • 53
    • 90
    1 2 3 4 5
    6