TLK
TLK

Reputation: 1770

In the Twitter gem, how do I configure the consumer_key and consumer_key_secret?

I don't see where to configure these. I assume I should make an initializer file of some sort. Any help?

I don't believe it is relevant, but I'm using omniauth for authentication and that's worked out just fine.

Upvotes: 2

Views: 1196

Answers (2)

dombesz
dombesz

Reputation: 7909

I think that's not the proper way to do, what if you reinstall your gems, or what when you set up your app in the deployment? I'd rather set up in an initializer file. Put it to rails_app/config/initializers/

twitterkey.rb

Twitter.configure do |config|
  config.consumer_key = YOUR_CONSUMER_KEY
  config.consumer_secret = YOUR_CONSUMER_SECRET
end

Upvotes: 5

TLK
TLK

Reputation: 1770

Answering my own dumb question:

/Library/Ruby/Gems/1.8/gems/twitter-1.0.0/lib/twitter/

Upvotes: 1

Related Questions