I have a registered app on Twitter and am able to post to my twitter feed. However, I can only get it to work when I put the initializer in my controller's create action.
client = Twitter::REST::Client.new do |config|
config.consumer_key = ''
config.consumer_secret = ''
config.oauth_token = ''
config.oauth_token_secret = ''
end
client.update("Hello World!")
I got to this point by following the advice in this post: Twitter integration rails 4 app
How do I make this work by having it read a file in my config/initializers / what would the best practice be?