谷歌+1按钮作为链接?

Goo*_*gle 5 css button hyperlink social-networking

您可以将Google +1按钮作为简单链接吗?

喜欢

<a href="http://google.com/+1/url=http://mysite.com" class="google-plus1">
  + 1
</a>
Run Code Online (Sandbox Code Playgroud)

我不喜欢iframe

lob*_*ner 2

为了避免 iframe,您可以使用以下方法: +1 您的网站

+1'ing http://www.example.com的代码:

<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

<!-- Place this tag where you want the +1 button to render -->
<g:plusone href="http://www.example.com"></g:plusone>
Run Code Online (Sandbox Code Playgroud)

  • 我更喜欢一个不需要在用户单击按钮之前*从谷歌加载任何数据*的解决方案。类似于“转到此处 +1 我的网站”链接。出于**隐私原因**,不要像这样嵌入 pulsone API。在某些司法管辖区,这甚至可能是非法的。 (2认同)