twitter-gem

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

梦想与她 提交于 2020-01-06 04:35:11
问题 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 an initializer at config/initializers/twitter.rb Twitter.configure do |config| config.consumer_key = PKe41... config.consumer_secret = qETY..... end And I'm trying into a controller : def twitter @twitter_home_timeline = Twitter.home_timeline end

Rescuing from Twitter Gem

拜拜、爱过 提交于 2019-12-25 03:24:56
问题 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 tweet.rb after we pass through omniauth redirect_to '/auth/twitter' #redirects to authorize via omniauth/twitter and create the user else @auth = Authorization.find_by_user_id(current_user) Tweet.update_status(@auth, params[:twitter_message]) redirect_to edit_user_path(current

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

亡梦爱人 提交于 2019-12-11 11:08:35
问题 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 a page, where user clicks to sign in with twitter (I am using http://sign-in-with-twitter.herokuapp.com/) Once user gets authenticated, I get token and secret and then use my app consumer_key and consumer_secret alongwith signed in user's token