title: can't authenticate with Facebook
body: <p>I'm following Ryan Bate's instructions for using Omniauth to set up third party authentication, except that I'm trying it with Facebook rather than Twitter, which he sets up in RailsCast 235.</p>
  
  <p>After installing omniauth-facebook gem, and setting up the initializer</p>
  
  <pre><code>Rails.application.config.middleware.use OmniAuth::Builder do
      provider :facebook, 'APP_ID', 'APP_SECRET'
  
  end
  </code></pre>
  
  <p>I should be able to go to localhost:3000/auth/facebook and be presented with the Facebook login (even though it won't eventually work because we haven't set up the callback url yet) However, when i go to that url, I get this error</p>
  
  <pre><code>{
     "error": {
        "message": "Error validating application.",
        "type": "OAuthException",
        "code": 101
     }
  }
  </code></pre>
  
  <p>and the url actually changes to</p>
  
  <pre><code>https://graph.facebook.com/oauth/authorize?response_type=code&amp;client_id=APP_ID&amp;redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Ffacebook%2Fcallback&amp;scope=email%2Coffline_access
  </code></pre>
  
  <p>On my app, I've set up Devise and followed the instructions on the Devise wiki for integrating Facebook authorization <a href="https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview" rel="noreferrer">https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview</a></p>
  
  <p>Can anyone tell me what the problem might be? </p>
  
  <p>Doing a Google search on the error message revealed that quite a few people have experienced this problem in recent weeks but couldn't find anyone with a solution
  <img src="https://i.stack.imgur.com/y3uUx.png" alt="enter image description here"></p>