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

[亡魂溺海] 提交于 2019-12-06 04:58:27

问题


It seems that Google only offers code to embed the +1 button.

However, there are heavy privacy concerns (plus quite some load time) associated with it.

For some pointers about the privacy and legal issues associated with Facebook like and Google +1, see: Like button and privacy concern

A common workaround seems to be a two-click solutionGerman (also discussed on slashdotEnglish), where the first click enables the button (loading the javascript from Google), the second then is on the regular +1 button.

However, I do not want to implement this two-click solution either. Largely because the Google +1 button is ugly as hell, and doesn't fit to the page layout.

What I'm really looking for is a separate web page, where the user can essentially confirm that he likes the page. This page can live on google.com, and essentially this would be the second click. I'm not trying to trick people into +1'ing the page. The second click is all fine with me. I just don't want to force them to load the plusone button (and I don't like its looks).

There seems to be the option of

https://plus.google.com/share?url=<URL>

which however is a share on Google+, not a +1.

I've seen this URL, too:

https://plusone.google.com/_/+1/confirm?hl=en&url=<URL>

(see e.g. here: Adding a Google Plus (one or share) link to an email newsletter) but I cannot submit this form (i.e. doesn't seem to work).

The best working solutions seems to be the two-click approach. :-(

Update: the url, https://plusone.google.com/_/+1/confirm?hl=en&url=<URL> actually does seem to work. It was just my privacy proxy breaking it. Then it seems to be more of a "Google+ share" dialog. I'm not yet happy with this result (in particular, since this doesn't seem to be an advocated approach for Google, and they can at any point consider to ban the site, I guess)


回答1:


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.




回答2:


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.




回答3:


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. :)



来源:https://stackoverflow.com/questions/9248204/linking-to-google-plusone-without-embedding-the-button-for-privacy-reasons

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