Google api 谷歌+;空气污染指数;400(错误请求)“;及;拒绝展示。。。在帧中,因为它设置为';X-Frame-Options';至';SAMEORIGIN'&引用;错误

Google api 谷歌+;空气污染指数;400(错误请求)“;及;拒绝展示。。。在帧中,因为它设置为';X-Frame-Options';至';SAMEORIGIN'&引用;错误,google-api,google-plus,google-authentication,Google Api,Google Plus,Google Authentication,我正在尝试将G+API与集成,但遇到了一个问题。如果在加载页面时查看控制台,您将看到以下错误: 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/postmes

我正在尝试将G+API与集成,但遇到了一个问题。如果在加载页面时查看控制台,您将看到以下错误:

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&forcesecure=1' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
我只是在使用谷歌网站上给出的示例代码:

<script type="text/javascript">
    (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);
    })();
</script>
我试着加载上面的页面,其中包含和不包含身份验证元标记(上面没有显示),但仍然出现错误


这似乎是谷歌方面的一个问题,因为我只是在使用最基本的裸体示例代码,它不起作用。

好吧,显然谷歌+只是出了个脑筋什么的,因为解决方案就是清除我的cookies


我尝试在另一台计算机上使用我的网站,Google+API运行良好(没有错误),所以我尝试清除桌面上的cookies,瞧,它开始工作了

我发现,如果客户长时间打开chrome浏览器,就会出现这个错误。一旦他们关闭chrome并重新打开,他们就不会有任何问题。我的解决方案是从服务器下载脚本,将其上传到我们的服务器,并将其作为备份下载。

有趣的是,每隔几个月我就会收到这个错误,用谷歌搜索它,然后找到我自己的答案!:-)
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>

<script type="text/javascript">
    (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);
    })();
</script>
</body>
</html>