So I just added the TweetMeme feature to this blog. By a simple click on the tweet button located at the bottom-right corner of each entry you can now tweet about the article.

I have to confess, the integration did not go as smooth as I was expected. The problem was that entries were tweeted with the wrong title - the title of the blog "Technology for Sun Partner", while I wanted the entry's title to be used instead.

I discovered that TweetMeme is actually using the html title definition located in the head section of the html page. In other words, if the page being tweeted looks like this:


Hello Twitter



...then the page will be tweeted with the title "Hello Twitter".

When installing the TweetMeme button on the landing page of the blog I basically made each permalink entry in my blog a possible target for TweetMeme.

TweetMeme then use the title of the permalink and not the title of the landing page.

The problem I was facing came from the fact that the title of the permalink was not set as I wanted in the blog's templates. By default, the tittle was the same as the one from the landing-page, it was the name of the blog.

I changed the template code to be (I am using a Roller blog):
#if ($model.permalink)
$model.weblogEntry.title - $model.weblog.name

#else
$utils.removeHTML($model.weblog.name)
#end



Now, when the page is actually a blog entry - a permalink - the title is made of the entry's title concatenated with blog title. I am also defining the tweetmeme-title meta data that allows to define more precisely what TweetMeme will use as a title (more info on this feature here).

But as you may have noticed if you tried to tweet some entries, that was not sufficient to completely fix the situation. Even after modifying the code, the problem is still there for many entries.

Well, when I modified the template code, I already had the TweetMeme javascript in place for a while, and I had loaded the landing page many times in my browser. I suspect that TweetMeme did not wait for anyone to hit a button before loading the permalink pages that are pointed by the javascript, and since it was active before I fixed the title, a lot of pages were loaded with the wrong title. I also suspect that the pages are now buffered somewhere (is TweetMeme using Memcached?) and since the URLs did not change, they are not re-loaded even if they have a new title.

Someone may say that I can go to http://tweetmeme.com/update/ping and get each of my URLs re-indexed, but considering the number of entries in this blog, I will first look for another solution.

The good news though is that TweetMeme now works for the future entries. Enjoy!




More...