When I implemented Trackback support here, one snag I ran up against is that I typically post to my website via the MetaWeblog API (using the very cool w.Bloggar client app), and the blog posting APIs don’t provide any inherent way to provide Trackback URLs. Nor should they, as that doesn’t really fall under the API’s core functionality. However, it still seemed wasteful to have to set up a separate web form just for doing Trackbacks. So here’s what I did….
In the server code that handles the client APIs for my blogging software, I added a snippet of code just after where a new entry is actually posted into my blog. The code snippet searches the incoming blog entry for an HTML comment that looks like:
<!-- trackback url=http://www.example.com/tb.cgi/987 -->
If it sees comment like that, the code extracts the Trackback URL and posts a Trackback ping to it. Voila! A tiny amount of work, and now I can go back to being moderately lazy. All I have to do is remember to put the Trackback URL in an appropriately formatted comment, and my server will automagically let the site know that I’ve linked to them.
I’d like to encourage anyone else involved in coding other blogging systems to do the same, if your software supports one of the blogging APIs (BloggerAPI, MetaWeblog API, etc) and Trackbacks.
Pingback: Pizza Review