title: Application Error when logging in with JavaScript SDK, using oauth opt in login
body: <p>Here is my code:</p>
  
  <pre><code>FB.init({
      appId  : this.api_id,
      status : true,
      cookie : true,
      xfbml  : true,
      oauth  : true,
      channelUrl  : 'https://blah.com/facebook/channel'  // custom channel
  });
  FB.login(function(response) {
      if (response.authResponse) {
          if (response.perms) {
          // user is logged in and granted some permissions.
          if(typeof redirect === 'function') {
              redirect();
          }else {
              window.location = redirect;
              }
          } else {
          // user is logged in, but did not grant any permissions
          }
      } else {
          // user is not logged in
      }
  },{
          scope: 'email'
  }
  );
  </code></pre>
  
  <p>So what happens is that if i have oauth no set in FB.init everything works fine but if i add in 
  oauth is true then i will get back</p>
  
  <pre><code>&lt;span&gt;Application Error: There was a problem getting data for the application you requested. The application may not be valid, or there may be a temporary glitch. Please try again later. &lt;/span&gt;
  </code></pre>
  
  <p>from the request to /dialog/oauth</p>
  
  <p>I followed all the roadmap to oauth 2 here <a href="https://developers.facebook.com/blog/post/525/" rel="nofollow">https://developers.facebook.com/blog/post/525/</a>
  and still no luck, something seems a bit off here.</p>
  
  <p>And no all the code posted in not all the code i have, before FB.login gets called i make sure
  FB.init has already been called. Any help greatly appreciated</p>