【发布时间】:2015-10-31 11:09:28
【问题描述】:
我正在尝试添加一个基本的环聊按钮组件,它将启动 Google 的环聊。我正在遵循Google Developer 中提到的步骤,但经过所有努力,我正在努力解决以下问题:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null').(anonymous function) @ core:rpc:shindig.random:shindig.sha1.js?c=2:838
3cb=gapi.loaded_0:112 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null').(anonymous function) @ cb=gapi.loaded_0:112
这是我用来在页面中开发环聊按钮的 sn-p:
<script src="https://apis.google.com/js/platform.js"></script>
<div id="placeholder-div"></div>
<script>
window.____gcfg = {
lang: 'en-US',
parsetags: 'onload'
};
gapi.hangout.render('placeholder-div', {
'render': 'createhangout',
'initial_apps': [{'app_id' : '902502537504'}],
'widget_size': 175
});
</script>
我还使用 https://console.developers.google.com/project/grabhouseportal/apiui/apiview/plusHangouts/overview 启用了我的 google+ 环聊服务
感谢任何帮助。
【问题讨论】:
标签: javascript html google-api hangout