Facebook surveils everyone's web browsing regardless of whether they have an account or not, as described in this paper: [link]
A simple way to prevent any packets being sent to or received from Facebook is to set up filtering using iptables. On most GNU and Linux distributions, you can run the following three commands as root:
iptables -A INPUT -d facebook.com -j DROP
iptables -A OUTPUT -d facebook.com -j DROP
iptables -A FORWARD -d facebook.com -j DROP
The URL can be changed for other sites as well if you wish. Eg - for Twitter's "tweet" buttons run the same commands but using platform.twitter.com as the domain to reject.
For more documentation on iptables, I recommend the Arch Wiki - [link]