开发者

How upgrade google + button?

开发者 https://www.devze.com 2023-03-25 05:09 出处:网络
I am beginner web programmer - please help me. I have this code: <script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\"></script>

I am beginner web programmer - please help me.

I have this code:

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

I should upgrade him to asynchronous snippet: http://googlewebmaster开发者_开发问答central.blogspot.com/2011/07/1-button-now-faster.html

My problem I don't which image size to choose in google config tool that will be same size as

<g:plusone size="tall"></g:plusone> that I already have in the website.

Thanks in advance


I'm not sure you're getting the correct idea. You're not changing the button, but instead the way the script behaves. Just keep your <g:plusone size="tall"></g:plusone> and change the script accordingly


Choose "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>

For Advacned information see +1 tag parameters section here: http://code.google.com/apis/+1button/

0

精彩评论

暂无评论...
验证码 换一张
取 消