You can do that by editing the /etc/hosts file.
I believe in Windows it’s C:/Windows/system32/drivers/etc/hosts.
Then add an entry facebook.com 127.0.0.1