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.

Comments

  1. Carolyn

    Why does it look so boring when it’s your own tweet?

  2. Mark Steadman

    You’ve lost me there :) TweetPaste doesn’t know whose tweet is which, so there’s no difference

Leave a comment