Google +环聊按钮 [英] Google + hangout button
本文介绍了Google +环聊按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正尝试将hangout按钮添加到我的html文件中,如下所示,但是当我运行html页面时,该按钮不显示.
I am trying to add a google hangout button to my html file as shown below but when I run the html page , the button does not show.
<!DOCTYPE html>
<html>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<div id="placeholder-rr"></div>
<script>
gapi.hangout.render('placeholder-rr', {
'render': 'createhangout',
'initial_apps': [{'app_id' : '184219133185', 'start_data' : 'dQw4w9WgXcQ', 'app_type' : 'ROOM_APP' }],
'widget_size': 175
});
</script>
</html>
推荐答案
-
首先,请在浏览器上使用f12键检查浏览器控制台中是否显示任何错误,然后重新加载页面.
First please check if any errors showing up in browser console using f12 key when on browser and reload the page.
尝试将此脚本以及platform.js一起添加到您要使用视频群聊按钮的页面.
< script src ="https://apis.google.com/js/client:plusone.js" type ="text/javascript"></script>
Try adding this script as well alongwith platform.js to the page you want the hangout button.
<script src="https://apis.google.com/js/client:plusone.js" type="text/javascript"></script>
希望这会有所帮助
示例代码:-
<div id="hangout-button-holder"></div> <script src="https://apis.google.com/js/client:plusone.js" type="text/javascript"></script> <script src="https://apis.google.com/js/platform.js" async defer></script> <script> $(document).ready(function(){ gapi.hangout.render('hangout-button-holder', { 'render': 'createhangout', 'topic': 'Its a demo app dont freak out', 'hangout_type': 'onair', 'initial_apps': [{'app_id' : 'xxxxxxxxxxx', 'start_data' : 'dQw4w9WgXcQ', 'app_type' : 'LOCAL_APP' }], 'widget_size': 175 }); }); </script>
这篇关于Google +环聊按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文