TweetPaste API released

You can now use TweetPaste from your own applications by making a simple HTTP call to the following address:

http://tweetpaste.thingamaweb.com/api/gethtml/

and passing in the following arguments:

id Required The ID of the tweet, as obtained by going to http://twitter.com, clicking the timestamp of the tweet and looking for the string of numbers at the end of the URL
iframe_width Optional The width (in pixels) of the tweet iFrame (default is 500)
iframe_height Optional The height (in pixels) of the tweet iFrame (default is 200). Note that the box will scale vertically to fit the size of the tweet (via JavaScript), so this setting isn’t always necessary
show_background Optional: 1 or 0 Show the twitterer’s background colour (default is 1)
include_padding Optional: 1 or 0 Useful if you’ve set show_background to 0; removes the padding around the tweet iFrame (default is 1)
show_username Optional: 1 or 0 Show the twitterer’s username and avatar (default is 1)
show_source Optional: 1 or 0 Show the source of the tweet: ie “via Web” (default is 1)

When you call the function, you’ll receive an HTTP response which contains just the HTML code you need to render in your application. If an error is caused, you should receive a response beginning with “ERROR: ”.

It’s in its absolute infancy, so if you experience any problems please let me know via the comments.

Exciting times

TweetPaste is getting a facelift, and more importantly a boatload of new features.

Soon you’ll be able to customise the look of the embeddable box the app produces. You can change the width and height (although the height will magically auto-expand for longer tweets), and hide certain areas you don’t need (like the user details, avatar and time etc). This is really handy if you want to display a lot of tweets on the same page.

You can choose whether to show or hide the background colour, which now matches the colour chosen in the twitterer’s user profile.

Also there’s a new bookmarklet on the way, which will give you a handy shortcut and save you the RSI involved in copying and pasting lots of URLs!

And on the WordPress front, there’ll be a new, version-controlled plugin. That does mean you’ll have to deactivate the one you’re currently using and install the new one when it arrives, but the good news is that, because it’s registered with WordPress, you’ll be able to upgrade to future versions directly from your dashboard.

The system’s been completely rewritten in a new language, so should be bags more reliable, and it is the second to join Bluemilkshake’s happy band of Thingamawebs: small projects built in Django.

So expect new things within the next week or so.
Relax, and enjoy your tweets.

TweetPaste is back!

After a pretty hefty period of down-time (not strictly true; the site was “up”, just not working!) TweetPaste is back, allowing you to embed tweets into your blog posts and pages.

Expect a full, version-controlled WordPress plugin soon.
Thanks for your patience!

Permalinks, protected tweets and SSL

Thanks to the various comments made across the interwebs and in the Wishlist, TweetPaste now has a few improvements:

  1. Just like twitter.com, the time is now a permalink to the original tweet (thanks Mike Bogle). The timing accuracy has also been improved, so a tweet posted 30 minutes ago will show “30 minutes ago” instead of “about an hour ago”
  2. Allow SSL tweets (ie: tweets whose URL begins with “https://”) to be embedded (thanks Jeton)
  3. Slightly better error handling

I’ve refreshed the cache so you should see immediate effect.

Still to do:

  1. Get the WordPress plugin onto wordpress.org’s CVS. Subscribe to our Twitter feed to find out when that’s available as you’ll need to deactivate the original plugin and install the new one, which henceforth will be version-controlled.

Thanks a bunch to everyone who’s written about the project so far. We’ve had nearly 200 tweets embedded around the Web, and I hope that number will just keep growing!

TweetPaste goes live

So it’s 3am and TweetPaste has just gone live after being tested on my home PC. It needed to be uploaded now because the WordPress plugin that I’ve just written needed a live URL. So here it is!

Really pleased to have got it all written in less than 12 hours. It’s a simple idea, so that helps. Still got lots to do on it though, like allowing users to customise the appearance of the embedded tweet and listing the tweets that have just been embedded, but it’s a start!

Got any features you want added?