Google+ 与 onendinteraction 回调函数共享未触发
Google+ share with onendinteraction callback function does not fired
大家晚上好
我有下一个代码:
<body>
....
<div class="g-plus" data-action="share" data-onendinteraction="apply_shared_actions" data-href="https://whosebug.com/questions/ask"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
var apply_shared_actions = function ( response ) { console.log('test_fired'); }
</script>
....
</body>
函数 apply_shared_actions 没有触发。
请告诉我哪里做错了?
data-onendinteraction
记录为:
If specified, this function is called when the interaction bubble disappears. You can use this callback function to modify your page, such as resuming a video, when the bubble closes.
随着 announcement Google+ 按钮的体验得到简化,不再有交互气泡来触发这些回调。
大家晚上好
我有下一个代码:
<body>
....
<div class="g-plus" data-action="share" data-onendinteraction="apply_shared_actions" data-href="https://whosebug.com/questions/ask"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
var apply_shared_actions = function ( response ) { console.log('test_fired'); }
</script>
....
</body>
函数 apply_shared_actions 没有触发。
请告诉我哪里做错了?
data-onendinteraction
记录为:
If specified, this function is called when the interaction bubble disappears. You can use this callback function to modify your page, such as resuming a video, when the bubble closes.
随着 announcement Google+ 按钮的体验得到简化,不再有交互气泡来触发这些回调。