小编use*_*124的帖子

Google+分享API中出现origin_mismatch错误

我想在谷歌+上分享一些动态内容.为此,我检查了它https://developers.google.com/+/web/share/interactive#rendering_the_button_with_javascript

<head>
<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';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
 })();
</script>
</head>
<body>
<button
  class="g-interactivepost"
  data-contenturl="http://www.pubandbar-network.co.uk/" 
  data-clientid="102180630313.apps.googleusercontent.com"
  data-cookiepolicy="single_host_origin">  Share 
</button>
</body>
Run Code Online (Sandbox Code Playgroud)

但是在执行时我收到了这个错误

Error: origin_mismatch
Request Details

    scope=https://www.googleapis.com/auth/plus.login
    response_type=code token id_token gsession
    access_type=online
    redirect_uri=postmessage
    cookie_policy=single_host_origin
    proxy=oauth2relay554026710
    origin=http://www.pubandbar-network.co.uk
    state=1995523240|0.4607792083184853
    display=page
    client_id=102180630313.apps.googleusercontent.com
    authuser=0
Run Code Online (Sandbox Code Playgroud)

请建议如何解决这个问题

api share mismatch google-plus

23
推荐指数
3
解决办法
6万
查看次数

标签 统计

api ×1

google-plus ×1

mismatch ×1

share ×1