WordPress Plugin: wpCommentTwit
If you own, run, maintain or even contribute to a WordPress site you might be one of many who enjoy being notified when someone leaves a comment on the site, I know I do. When someone leaves a comment I like to be notified relatively as soon as it has been posted so that I can check it out and reply if needed. Currently I am subscribed to my comments RSS feed but with Google Reader it is not always instant. In fact I usually have to wait an hour or two to see if someone left a comment. Sure Google picks up my newly posted blog posts and displays it right away in my reader, but when it comes to comments it is not as prompt.
WordPress Plugins
One thing I have always enjoyed doing is programming for the web. I have been using PHP for almost 4 years now and have been tinkering with some WordPress plugins of my own. When Duane Storey released his WordTwit pluging it got me thinking about a new WordPress plugin to help me manage the smaller aspects of my blog. This is when I got the idea of creating a plugin that works similar to WordTwit but for comments.
WordTwit by Duane Storey
For those who do not know what WordTwit is, it is a WordPress plugin that sends out a status update to Twitter about a newly posted blog post without you doing it manually. This is handy plugin for those who do not want to have to type out a tweet for their Twitter followers or if you have set the post to be published while you are asleep (or otherwise busy) and still want your Twitter followers notified of a new post.
wpCommentTwit
I had a large struggle with getting my newly created WordPress plugin working properly. I have access to 4 web servers and only 3 of the servers would probably send the tweet out. My main webserver (hosted here on Bluefur) was the one giving me issues and I did not want to create a plugin that would only work on some webservers. The only thing I could think of was that the libcURL was having an issue since that Bluefure was running the latest release (7.18.2). I found out that the culprit was one of the option settings for cURL in PHP (curl_setopt($ch, CURL_NOBODY, 0) in which I had to do some trial & error troubleshooting to figure it out.
Once I got it working on all the webservers I have access to I had to fine tune the plugin a bit more. See when I first had it running it would send me a Direct Message for ALL comments posted to my blog, this included SPAM comments as well. That was quickly changed when I put a check in to make sure the comment was approved as not SPAM. I also allowed it to send the URL of the newly created comment at the end of the Direct Message it sends you so you can have easier access to read what was left.
About wpCommentTwit

What is it? Well wpCommentTwit is a WordPress plugin that notifies you via a Direct Message from Twitter that someone has left you a comment on one of your blog posts.
How do I use wpCommentTwit?
Once you have uploaded an extracted copy of the plugin into your plugin directory (wp-content/plugins) activate it via your Admin Control Panel and then go to your Settings page to select wpCommentTwit. Here you need to fill out a couple of text fields to ensure this plugin works.
You also need to set up a Twitter Bot account. Pretty much the Twitter Bot account is a second account in which your Direct Messages will come from since you are not allowed to send yourself Direct Messages via Twitter. When you do set up a second account ensure you enable ‘Protect My Updates’ so that other people cannot follow your Twitter Bot.

The Admin settings page for wpCommentTwit should be pretty straight-forward. Once you have entered the appropriate values (username/password, target, message) you will be notified via Twitter (and your Twitter Bot) every time someone leaves an approved comment on your blog.
How do I get wpCommentTwit?
Follow the link below and it should automatically prompt you to download the file.
WordPress Plugin: wpCommentTwit 0.1
If you have any comments, suggestions, bugs, or whatever you can get in touch with me by filling out my Contact Me form.





7 Responses to "WordPress Plugin: wpCommentTwit"