CNET también está disponible en español.

Ir a español

Don't show this again


Twitter embeds tweets: Simple hack lets you rewrite anyone's tweet

Twitter has introduced embeddable tweets -- but we've spotted a simple hack to rewrite other users tweets

Twitter has a new tool to embed individual tweets in your blog or Web site. It's handy for anyone looking to quote tweets in news stories or blog posts, but we've spotted a simple HTML hack that lets you completely rewrite that tweet...

To create an embedded tweet, right-click on the time-stamp of the tweet -- that's the bit that either says the time or something like "less than a minute ago" -- and copy the link to your clipboard. Bop over to and paste in the URL. Bake it, and you'll get a preview and some code. Copy and paste the code into your Web site, like a YouTube video. The result looks like this:

So this is what an embedded tweet looks likeless than a minute ago via TweetDeck

While it works like an embedded YouTube video, it's actually quite different. An embedded video calls back to the host site, and if the video is removed, other sites suddenly find themselves with empty YouTube players and an error message. Because it's just text, Twitter simply recreates the tweet, in HTML that matches your site. (Read on for why it says ''.) Really, it's more of a quoted tweet than an embedded tweet.

That means the quoted tweet won't disappear should the quotee get cold feet and delete an indiscreet message. Good news for publishers that get their news from celebrity Twitter feeds, and less fiddly than capturing screenshots for posterity.

This isn't yet an official feature. Instead it's a bit of script that's been thrown together by a member of the Twitter media team.

The hack

But there's a catch. The use of HTML to quote a tweet means you can alter its content, and so merrily tweak tweets. All you have to do is dive into the HTML code, find the text of the tweet, and type whatever you want. You can change the timestamp or even the name of the tweeter if you're feeling malicious.

Here's some topical general election-related examples of such mistweetment -- click the timestamps to see the real tweets:

Over 100,000 people just received a text message from David Cameron, telling them they smell funny. #ukelectionless than a minute ago via Echofon


Peter Mandelson was never actually elected to his job, y'knowless than a minute ago via web


We believe in fairness. Vote for real change today - vote for a party that's never actually ruled the countryless than a minute ago via web


Hours of fun. There are other teething problems: a working timestamp is on the way, and you may have noticed on this page that multiple quoted tweets all adopt the background of the last one you pasted in (to be fair, this might well be our temperamental publishing system's fault). Back to the drawing board, then, before this becomes an official feature.