Jan
12
WordPress tweetbacking
15 years ago, mid-January | 4 Comments
Tweetbacking, it sounds like some sort of deviant sport or something but isn’t. The idea behind Tweetbacks, similar to pingbacks, is that you can see who is commenting (tweeting) about your blog on Twitter. There are a number of plugins available for use in the end I went for Joost de Valk‘s version. While it worked nicely I decided that I really wanted to approve the tweets before they appeared in my blog so I modified the code a little. The diff is available for download. It allows you to enable and disable the automatic approval of Tweets form the plugin’s admin page. Hopefully Joost will add this option in the official version sometime.
Tweetbacks are saved in the comments table and can be displayed however you like for example, in my comment loop I have:
<?php if (strtolower($comment->comment_type) == 'tweetback') { $avatarurl = str_replace( "twitter:", "http://s3.amazonaws.com/twitter_production/profile_images/", $comment->comment_author_email ); echo "<img align=middle" ." src='$avatarurl' border=none" ." width=40 height=40 alt=''>"; } ?> |
A word or two of caution about the plugin. Personally I’ve removed the bit.ly url shortening link parsing because it just didn’t work properly – I ended up with bogus tweetbacks until I did. The other issue is with the date saving from the tweetback, it doesn’t work properly either giving dates in the 1970’s!!!
Tagged with: opensource • software
January 12, 2009 22:09
Comments
4 Comments so far
Current Electricity Use (15min)
iPhone/Webkit RSS Reader
Links
- automated home
- Automated It Technology News
- awooga!!!
- LinITX
- My Acer page
- My Asterisk pages
- My Work in progress (old)
- Noble Race Car
- openmoko / neo 1973 wiki
- planet openmoko
- Spadgecock Cumpants
@mlanger http://tinyurl.com/9zhga2 will be of interest to you until it’s part of the main version
Gawd I love open source: http://tinyurl.com/9zhga2 great addition to my tweetbacks plugin.
Hmm that’s a pretty cool addition, I’ll certainly think about adding it!!
Thanks, glad you like the idea 🙂 The patch should apply fairly cleanly to your current version.