Blocking Facebook’s Like Button with Squid
Even if someone is not a Facebook user or is not logged in, Facebook’s social plugins collect the address of the Web page being visited and the Internet address of the visitor as soon as the page is loaded–clicking on the Like button is not required. If enough sites participate, that permits Facebook to assemble a vast amount of data about Internet users’ browsing habits.
Well, that’s creepy. Even though I deleted my Facebook account, they’re still trying to collect information about me by embedding themselves in other websites. Well, that happens to be really easy to fix for my entire network running through a Squid proxy server:
# Facebook Like Button Denial acl facebook dstdomain .facebook.com acl facebook_like urlpath_regex -i ^\/plugins\/like\.php deny_info error-facebook-like facebook_like http_access deny facebook facebook_like
I also had to create this file in my error_directory: /usr/share/squid/errors/en/error-facebook-like
<p>This just in: <b>Facebook Sucks.</b></p>
Now, when I go to a site with a Like button on it, it looks like this:
But Kelsey can still get to her beloved Facebook directly! Thanks, Squid team.



Salmonella.dk
July 8, 2010 at 9:09 AM
Nice one…using it to block like url.
THX
Getting back at them.
:twisted:
Using dansguardian with squid, you can replace all instances of “Facebook” with “Foolbook” pretty easy :
in /etc/dansguardian/lists/contentregexplist insert 2 lines
“Facebook”->”Foolbook”
“Foolbook.com”->”Facebook.com”
with this users can still surf facebook.
immux
April 27, 2011 at 10:24 PM
nice.. i try to modify and add some for this
acl facebook_like_plugin urlpath_regex -i ^\/plugins\/like\.php
acl facebook_like_widget urlpath_regex -i ^\/widgets\/like\.php