Linking to Google PlusOne, without embedding the button (for privacy reasons)

坚强是说给别人听的谎言 提交于 2019-12-04 10:20:39

The only officially supported method of +1'ing a URL is with the +1 button. Either always loading or loading it on a second click.

The approach that I'm now looking into is fairly trivial:

I've set up a Google Plus page for the web site, and the "plus" button sends user there. In fact just like the Facebook icon I'm using. Then the users get the full choice of interaction options, including +1, but also circling and sharing.

First of all, this obviously should not violate any g+ policies. Secondly, it is a fairly transparent behaviour for the users. The "plus" button takes them to Google plus, where they see the usual plus UI.

Secondly, it's still just two clicks to "+1". So it is not worse than any other data privacy compliant solution.

Ian Miles

I found the solution here.

The problem is, social sites accepts your own "share" forms, but only if the link is URL encoded.

In Wordpress, a custom Google+ button that I'm using without the official API, and it's currently working, is this following code:

<a href="http://plus.google.com/share?url=<?php print(urlencode(get_permalink())); ?>+<?php print(urlencode(the_title())); ?>" title="Share this story on google+">google+</a>

Hope it helps, go to the link above for a list of the rest of the social sites links. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!