Jeffrey Weston >tech

Facebook Is The Bad Neighbor

You've seen it: the share via facebook link. It is a common device, passing an url and a title through parameters to something that consumes them and links up your desired content. This is FB's "sharer".

Following the guidelines on the dev wiki, using the suggested metatag information, you've added information to your page Facebook share should be able to consume. (Keep in mind Facebook is the only widely "sharing" site for which you have to do this although some consume the thumbnail since they've essentially made it a standard.)

Easy right? Not really. The behavior is unexpected, seemingly squirrelly. When you're dealing with folks who get a lot of traffic through this sharing mechanism, if there's any change whatsoever, it's a big deal. And people you work with expect, since the information is coming from you, that you control the way FB displays your content. The expectation is that you somehow can change, fix, or alter the way FB shares the content you ask them to. This is just part of being in technology, you're responsible in a sense for the way other people's applications work.

Facebook's sharer breaks on a fundamentally central principle of the XHTML spec: that you can, and should prefix your XHTML docs with the xml declaration.

from w3c:
An XML declaration is not required in all XML documents; however XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding was determined by a higher-level protocol. Here is an example of an XHTML document. In this example, the XML declaration is included.


Again, the declaration isn't necessary, but that the inclusion breaks sharer from finding the proper title and description to your page is pretty unfortunate. I've made a test page proving this here.

Now this isn't some small company I'm picking on, not some person's personal blog they've worked hard on to show their family snaps or whatever, this is goddamn Facebook, the site that has the most attention and traffic on the planet, so something as small as not being able to grab the title and description from a shared page, and ignoring the "t" param altogether, and goes unfixed, seems sloppy.

It has always felt that Facebook wishes it had its own little garden. There's the web and then there's also Facebook, and there are thousands of people like me hacking ways to get them to cooperate. This division of ideas (like fbml namespacing) are more than just a little annoying or inconvenient, they make me hoping mad. Facebook cannot monkey patch the web.

Facebook is a bad neighbor, I want to like you FB, but you gotta turn down the music a little and put your trash out like everyone else.

techMar 01 2010 7:30 p.m.