title: Facebook oauth dialog shows "An error occurred. Please try again later."
body: <p>I copied the HTML below from the 'Facebook for Websites' Facebook developer page and replaced APPID with my app id. I put this page on my dev web server. If I navigate to the page, it renders the login button just fine. But clicking the login button, it opens the Facebook login page which says "An error occurred. Please try again later."</p>
  
  <p>I must be missing something fundamental. Any ideas?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;My Facebook Login Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="fb-root"&gt;&lt;/div&gt;
    &lt;script&gt;
      window.fbAsyncInit = function() {
        FB.init({
          appId      : 'APPID',
          status     : true, 
          cookie     : true,
          xfbml      : true,
          oauth      : true // removed a comma after 'true' as it generates a script error
        });
      };
      (function(d){
         var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
         js = d.createElement('script'); js.id = id; js.async = true;
         js.src = "//connect.facebook.net/en_US/all.js";
         d.getElementsByTagName('head')[0].appendChild(js);
       }(document));
    &lt;/script&gt;
    &lt;div class="fb-login-button"&gt;Login with Facebook&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Further investigation shows that it works fine in Chrome, Firefox and Safari, and fails in IE9.</p>
  
  <p>This is the URL it goes to in Chrome, it works fine:
  <a href="https://www.facebook.com/login.php?api_key=255367907914&amp;skip_api_login=1&amp;display=popup&amp;cancel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%26error_reason%3Duser_denied%26error%3Daccess_denied%26error_description%3DThe%2Buser%2Bdenied%2Byour%2Brequest.%23cb%3Df16c026dc%26origin%3Dhttp%253A%252F%252Fsami.test.eu%253A81%252Ff314f6d52%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df48d09da8&amp;fbconnect=1&amp;next=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Fpermissions.request%3F_path%3Dpermissions.request%26app_id%3D255367907914%26redirect_uri%3Dhttps%253A%252F%252Fs-static.ak.fbcdn.net%252Fconnect%252Fxd_proxy.php%253Fversion%253D3%2523cb%253Df16c026dc%2526origin%253Dhttp%25253A%25252F%25252Fsami.test.eu%25253A81%25252Ff314f6d52%2526relation%253Dopener%2526transport%253Dpostmessage%2526frame%253Df48d09da8%26sdk%3Djoey%26display%3Dpopup%26response_type%3Dtoken%252Csigned_request%26domain%3Dsami.test.eu%26fbconnect%3D1%26from_login%3D1%26client_id%3D255367907914&amp;rcount=1" rel="nofollow">https://www.facebook.com/login.php?api_key=255367907914&amp;skip_api_login=1&amp;display=popup&amp;cancel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%26error_reason%3Duser_denied%26error%3Daccess_denied%26error_description%3DThe%2Buser%2Bdenied%2Byour%2Brequest.%23cb%3Df16c026dc%26origin%3Dhttp%253A%252F%252Fsami.test.eu%253A81%252Ff314f6d52%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df48d09da8&amp;fbconnect=1&amp;next=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Fpermissions.request%3F_path%3Dpermissions.request%26app_id%3D255367907914%26redirect_uri%3Dhttps%253A%252F%252Fs-static.ak.fbcdn.net%252Fconnect%252Fxd_proxy.php%253Fversion%253D3%2523cb%253Df16c026dc%2526origin%253Dhttp%25253A%25252F%25252Fsami.test.eu%25253A81%25252Ff314f6d52%2526relation%253Dopener%2526transport%253Dpostmessage%2526frame%253Df48d09da8%26sdk%3Djoey%26display%3Dpopup%26response_type%3Dtoken%252Csigned_request%26domain%3Dsami.test.eu%26fbconnect%3D1%26from_login%3D1%26client_id%3D255367907914&amp;rcount=1</a></p>
  
  <p>This is the URL in IE9 which results in the error:
  <a href="https://www.facebook.com/dialog/oauth?api_key=255367907914&amp;app_id=255367907914&amp;client_id=255367907914&amp;display=popup&amp;domain=sami.test.eu&amp;locale=en_US&amp;origin=1&amp;redirect_uri=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df14fd3a0495986%26origin%3Dhttp%253A%252F%252Fsami.test.eu%252Ff2d9bfc6aa24134%26relation%3Dopener%26transport%3Dflash%26frame%3Df2539c36bc13734&amp;response_type=token%2Csigned_request&amp;sdk=joey" rel="nofollow">https://www.facebook.com/dialog/oauth?api_key=255367907914&amp;app_id=255367907914&amp;client_id=255367907914&amp;display=popup&amp;domain=sami.test.eu&amp;locale=en_US&amp;origin=1&amp;redirect_uri=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df14fd3a0495986%26origin%3Dhttp%253A%252F%252Fsami.test.eu%252Ff2d9bfc6aa24134%26relation%3Dopener%26transport%3Dflash%26frame%3Df2539c36bc13734&amp;response_type=token%2Csigned_request&amp;sdk=joey</a></p>