It doesn't really matter if the FB code doesn't validate. Validation is only a guide, to warn you if there are potential problems.
Anyhow, that site you linked to probably validates because it is using an outdated doctype, which allows for old-style coding:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
You are probably using a more modern doctype. Changing to an old doctype might get rid of your validation errors, but that's a bit like sticking your head in the sand to make your problems go away.
FB code just doesn't validate, so if you are going to use it, you have to accept that. There are no prizes for clean validation, anyhow. It's just a way of checking if there are any major issues that may cause your page to break. The FB button won't do that, though, so it's not a problem.