TweetMeme and XHTML
The last tweet on my Twitter account is dated around 2 years ago. I stopped using the service in late 2007 because I didn’t see a point in “microblogging” anymore. Somehow though, I found myself doing something similar on my Facebook status messages for over an year now. Accordingly, I thought it wouldn’t be a bad idea to go back and take a look at the current state of tweeting affairs. Meanwhile, I searched for a plugin to link Twitter with WordPress and found TweetMeme. The nifty little code places “Tweet” buttons on the blog posts. Unfortunately, after I activated it my site broke down on account of invalid XHTML (since the pages get delivered to FF as application/xhtml+xml
, that was expected too). A quick look at the code resulted in the following fix:
diff -Naur tweetmeme/tweetmeme.php tweetmeme.xhtml/tweetmeme.php --- tweetmeme/tweetmeme.php 2009-07-17 20:52:11.000000000 +0600 +++ tweetmeme.xhtml/tweetmeme.php 2009-08-29 03:03:00.000000000 +0600 @@ -26,21 +26,21 @@ $button .= '<iframe src="https://api.tweetmeme.com/button.js?url=' . urlencode($url); if (get_option('tm_source')) { - $button .= '&source=' . urlencode(get_option('tm_source')); + $button .= '&source=' . urlencode(get_option('tm_source')); } if (get_option('tm_version') == 'compact') { - $button .= '&style=compact'; + $button .= '&style=compact'; } else { - $button .= '&style=normal'; + $button .= '&style=normal'; } if (get_option('tm_url_shortner')) { - $button .= '&service=' . urlencode(get_option('tm_url_shortner')) . ''; + $button .= '&service=' . urlencode(get_option('tm_url_shortner')) . ''; } if (get_option('tm_api_key')) { - $button .= '&service_api=' . urlencode(get_option('tm_api_key')); + $button .= '&service_api=' . urlencode(get_option('tm_api_key')); } $button .= '" '; |
At the same time, I also encourage people to take a look at “Wordr” — the nanoblogging startup that’s going to make Twitter totally obsolete within months to come.
Tags: Bugfix, TweetMeme, Twitter, Web, Web 2.0, WordPress