Archive by Author

Customising the Title

Many users have been asking us for the ability to customise the title that the TweetMeme button sends as part of its tweet. However, we’ve been generally wary of providing this functionality as it has the potential to make the button behave in an unpredictable way – specifically, it would allow the site owner to use their users for spam.

The main reason this feature has been requested so much is so that content authors can separate a site/blog title from the content title. For example, a page with the title “TweetMeme Blog » Retweet Button Explained” would result in the following tweet:

RT @talkTweetMeme TweetMeme Blog » Retweet Button Explained http://retwt.me/33K

Since the blog title offers little value to the tweet, it would be preferable to remove it. This is now possible using the new TweetMeme Wordpress Plugin 1.6, or manually using the “tweetmeme-title” meta-tag for other platforms.

Adding this tag to the HEAD section (between the <head> and </head> tags) of a page will override it’s title:

<meta name="tweetmeme-title" content="Retweet Button Explained" />

This will make any buttons that point to this page use this title for their tweet:

RT @talkTweetMeme Retweet Button Explained http://retwt.me/33K

Of course, many websites use automated systems to generate their page titles, for example, in Wordpress you can use the following in your header.php template and all blog posts will use the post title as the text of the tweet:

<meta name="tweetmeme-title" content="<?php wp_title(''); ?>" />

There is one major caveat to this system. Our systems require the tweetmeme-title to be a strict subset of the page title. i.e. The tweetmeme-title must be derived directly from your original page title – if it is not, it will be ignored. This is to ensure that the tweet the button sends can always be predicted by the user to be relevant to the page they are reading.

Changes to the Tweetmeme API

With our latest updates much of the underlying data Tweetmeme processes has changed – most notably, we now filter stories in to categories in an effort to make stories more digestable to particular audiences.

This has a knock-on effect to our API, which has undergone a few substantial changes. While it’s never great to break backwards compatability, we feel that the additional power these changes will afford developers warrant the break. That said, we want to make the transition as smooth as possible, so we’re documenting all the changes as heavily as we can.

First off, we’ve updated the official API documentation. If you’re new to our API, this should be all you need to get started building an application on top of our data.

If you’ve already made use of our API, fear not, the changes we’ve made aren’t too drastic:

url_info

In the response: “category” has been renamed “media” to better reflect it’s purpose. The return values have also been refined to one of: “news”, “image” or “video”. Anything not classified as an “image” or “video” will generally be classified “news”. However, we may well add more types in the future.

popular, recent

As in url_info, the “category” element in the response has been renamed “media” and behaves as it does in url_info.

The parameter “category” has also been renamed “media”, which accepts either “news”, “image” or “video” – as with the equivilent response element.

categories

A new API call has been added to retrieve a tree of categories. It is described in more detail on the API documentation page.

tweets

A new API call that allows you to retrieve a paginated set of tweets for a given URL, returning a maximum of 20 tweets per page.

That’s it! If you have any problems or suggestions with any of these API calls, please let us know in the Tweetmeme API Feedback Forum