如何升级google +按钮

How upgrade google + button?

本文关键字:按钮 google 何升级      更新时间:2023-09-26

我是初学者,请帮助我。

我有这样的代码:

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
            <g:plusone size="tall"></g:plusone>

我应该把他升级为异步代码段:http://googlewebmastercentral.blogspot.com/2011/07/1-button-now-faster.html

我的问题是我不知道在谷歌配置工具中选择与
大小相同的图像大小<g:plusone size="tall"></g:plusone>,我已经在网站上了

Thanks in advance

我不确定你是否理解正确。您没有更改按钮,而是更改脚本的行为方式。只要保留您的<g:plusone size="tall"></g:plusone>并相应地更改脚本

选择"Tall"

<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="tall"></g:plusone>
<!-- Place this tag after the last plusone tag -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

有关高级信息,请参阅+1标签参数部分:http://code.google.com/apis/+1button/