title: Twitter gem best practice - controller vs. initializer
body: <p>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.</p>
  
  <pre><code>        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!")
  </code></pre>
  
  <p>I got to this point by following the advice in this post:
    <a href="https://stackoverflow.com/questions/19057123/twitter-integration-rails-4-app">Twitter integration rails 4 app</a></p>
  
  <p>How do I make this work by having it read a file in my config/initializers / what would the best practice be?</p>