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
Ok, I found the answer... Keys in the initializer must be set with quotation marks :
Twitter.configure do |config|
config.consumer_key = 'PKe41...'
config.consumer_secret = 'qETY.....'
end