Like for privacy protection

‘like’ – social share with privacy

text:
Tobias Groganz

tags:

Today I have implemented several social share buttons on my single-post sites. Beneath each blog-post you now find the ability to share the blog post on Facebook, Google+ or Twitter. Well, this is nothing special so why is this worth to tell? Read on.

Nowadays it seems to be standard to have the ability on a website to like and share it to whom ever you want. I like my favorite music, my favorite books or websites I regularly visit. Once the ‘like button’ used to be only published within Facebook to like everything appearing in your news feed. Since almost 2 years now it is possible to embed this button on every site in the world wide web. As the ‘like button’ almost appears on every website it has attracted the attention of many privacy groups. Especially in Germany the result of their examination was pretty hard. Even without clicking on the “like-button” on a website, Facebook is tracing you. Therefor it doesn’t matter whether you are logged in or not. That way, Facebook is able to track your whole route through the world wide web on sites including the button with the thumb up. The only protection against it, would be to switch of your javascript. But that would also mean that you are no longer able to use rich media applications within your browser.

So what to do? Totally neglect the like button and thereby withdraw from the social web? No.
On my site I am using the 2-click jQuery Plug-In ‘socialshareprivacy’ which has been developed by heise online. Besides the Facebook like button, the plugin also covers social share via Google+ and Twitter. The idea behind is pretty simple: Implemented in the site is a dummy-button that has to be activated before using. That way, when visiting a page not the real share-button is loaded and no data is send to third parties. The first click activates the button (now data is send) and with the second click you can ‘like’, ‘tweet’ and ‘+1′ as usual.

social share buttons deactivated

social share buttons activated

Implementing the plugin is pretty simple. You can download the plugin and all necessary files (not jquery) here. All you need is including the latest jQuery and ‘socialshareprivacy‘ javascript files by adding the following lines in the head of your html.

<script type="text/javascript" src="jquery.js"></script>
<script type=”text/javascript” src=”jquery.socialshareprivacy.js”></script>

<script type="text/javascript"> jQuery(document).ready(function($) 
{ if($('#socialshareprivacy').length > 0) 
{ $('#socialshareprivacy').socialSharePrivacy(); } }); </script>

The third script-blog is simply binding the plug-in function to a defined, empty html element. In this case to the div ‘socialshareprivacy’. If you now want to implement the buttons to your page you simply add this empty div at any place in your <body>

<body> 
... 
<div id="socialshareprivacy"></div> 
... 
</body>

In the download package is also included the dummy images and a preformatted css file (which should also be included in the head of your html file for the case you want to use it). As the plug-in is licensed under the MIT Open Source license you are free to adjust it the way you like for your website. For more information and configurations see the heise online documentation for the plug in.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>