title: OmniAuth Strategies Facebook NoAuthorizationCodeError (must pass either a `code` parameter or a signed request (via `signed_request` parameter):
body: <p>I am getting a error:</p>
  
  <pre><code> OmniAuth::Strategies::Facebook::NoAuthorizationCodeError (must pass either a 
  `code` parameter or a signed request (via `signed_request` parameter or a 
  `fbsr_XXX` cookie)):
  </code></pre>
  
  <p>Its not coming all the time. Its coming once in a while, notified by airbrake.</p>
  
  <p>There are lot of links for this on google search but not able to find out a proper solution.. Anyone?
  omniauth.rb under initializers directory:</p>
  
  <pre><code>OmniAuth.config.logger = Rails.logger
  Rails.application.config.middleware.use OmniAuth::Builder do
    provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'], {:client_options =&gt; {:ssl =&gt; {:ca_path =&gt; "/etc/ssl/certs"}}, :scope =&gt; 'user_about_me,email,publish_actions,user_location,publish_stream,offline_access,user_interests,user_likes,user_hometown', :display =&gt; 'popup'}      
  
    OmniAuth.config.on_failure = Proc.new do |env|
      #this will invoke the omniauth_failure action in SessionsController.
      "SessionsController".constantize.action(:omniauth_failure).call(env)
    end         
  end
  </code></pre>
  
  <p>PS: I am using facebook javascript sdk with <a href="https://github.com/mkdynamic/omniauth-facebook">facebook-omniauth</a></p>