Embedded Tweets Not Ready for Prime-Time

Twitter just launched a little tool designed to make it easier to embed tweets into your website. Currently blogs tend to paste in tweets whenever a twitter source requires reference, as Twitter explain in their blog post “…a pasted-in image of a tweet is a bit of a hack. We have a simple alternative to propose…”

All you have to do, in theory, is load up Twitter’s “Blackbird Pie” tool, enter a “full tweet URL” and voila, neat little embedded tag.

Unfortunately, the HTML code it currently outputs is a massive pile of garbage. By massive, I mean really massive; embed code is running well over 1kilobyte. I’ve never seen anything like this before. Seriously, try it out! The HTML is pretty garbage-tacular too. It spits out an inline <style> tag in an attempt to replicate the native twitter.com profile style of the cited user. I guess they’re trying really hard to replicate the look of a screenshot.

There are numerous problems with this implementation: 1) <style> is inside <body> won’t validate in current Doctypes (AFAIK); 2) I can almost guarantee that the majority of WYSIWYG editors and/or output filters will barf up the inline style – wordpress certianly does; 3) even if you are able to post the embed, it’s quite likely that RSS readers and some browsers will ignore the <style> tag, rendering your embedded tweet illegible; 4) some of the key class names they’ve chosen – eg. timestamp, author, metadata – are not very unique and could potentially have existing styles assigned to them.

There is no real indication that this tool is experiment or “alpha,” just a short “use at your own risk.”

Blackbird Pie does not taste good. They should not have released this on a public server, it’s embarrassing.

Leave a Reply

Your email address will not be published. Required fields are marked *