title: Google+ API "400 (Bad Request)" and "Refused to display ... in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'." errors
body: <p>I am trying to integrate the G+ API with <a href="http://www.pricewombat.com" rel="noreferrer">my website</a> and am having a problem. If you look at the console when loading the page, you will see the following errors:</p>
  <pre><code>GET https://accounts.google.com/o/oauth2/postmessageRelay?parent=http%3A%2F%2Fwww.pricewombat.com 400 (Bad Request) cb=gapi.loaded_0:436
  
  Refused to display 'https://accounts.google.com/o/oauth2/postmessageRelay?parent=http%3A%2F%2Fwww.pricewombat.com#rpctoken=356505585&amp;forcesecure=1' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
  </code></pre>
  <p>I'm just using the example code given on Google's website:</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
      (function() {
          var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
          po.src = 'https://apis.google.com/js/client:plusone.js?onload=googlePlusOnloadCallback';
          var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
  &lt;/script&gt;
  </code></pre>
  <p>If I run <code>gapi.auth.signIn()</code> in the console, nothing happens. I'm assuming the problem is related to the above errors when the page loads.</p>
  <p>What's causing this problem and how do I fix it?</p>
  <p><strong>UPDATE:</strong></p>
  <p>I created a blank page on my website with this barebones code:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;script type=&quot;text/javascript&quot;&gt;
      (function() {
          var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
          po.src = 'http://apis.google.com/js/client:plusone.js';
          var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>I tried loading the above page with and without the authentication meta tags (not shown above) and am still getting the errors.</p>
  <p>It seems like this <em>has</em> to be a problem on Google's end since I'm just using the most basic barebones example code and it's not working.</p>