Skip to content
125

Commentwitter Plugin Page

Commentwitter Plugin Page

DOWNLOAD | Official WordPress Plugin Page

Ultimately my goal is to give the commenter the option of sending their comment to twitter and allowing people to follow that blogs comments both in the blog and in twitter. The main reason for this is to generate a buzz and encourage commenting on peoples blogs. It will also improve the quality and value of people’s tweets revolving around blog posts.

Features

  • Ajax “Send To Twitter” interface integrates seamlessly
  • Commenters can Tweet their comments
  • Links back to comments are shortened with bit.ly
  • Blog author can Tweet all new comments
    • A prefix can be added to the tweet

Installation

1) Upload the “commentwitter” folder to the “/wp-content/plugins/” directory

2) Go into the WordPress admin interface and activate the plugin

(The following step is not needed if you are using the Thesis theme)

3) Now click on “Appearance” in your wordpress administration panel and click “Editor”. Locate “Comments” on the right and insert the following PHP function where you would like the login prompt and text for the plugin:

<? get_commentwitter_input(); ?>

Note: This is usually right before:

<p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />

* Instructions in Italian

Demo

CommenTwitter CommenTwitter CommenTwitter

View a live demo in the comment form below. Just click “Send To Twitter“, input your credentials and submit your comment.

Help a Developer Out

CommenTwitter, blogging and developing other blogging plugins and themes takes up a lot of my time. As much as I love doing it, development slows down when I start taking in side work to pay the bills. If you like CommenTwitter or anything else you see on JonBishop.org, please feel free to donate the amount of your choice to help keep me running.

Download CommenTwitter

Download

Note: WordPress does not save your Twitter Username or Password however you should always use caution when giving away your twitter credentials. Always be sure you trust the website before you give away any private/personal information.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
125 Comments Post a comment
  1. Feb 20 2009

    I wish OAuth for Twitter was ready so I could use that instead of asking for passwords

    Reply
  2. Feb 20 2009

    So I’m thinking I’ll create an options page that allows you to switch between the API and opening Twitter via some kind of Lightbox/javascript thing.

    I also want to make it so the urls in the Tweets link to the comment rather than the post.

    Reply
  3. Feb 20 2009

    So I got rid of slashes and was able to link directly to comments. I’ll work on it some more later.

    Reply
  4. Feb 22 2009

    Now that’s an interesting concept you have there! Currently, I’m also developing such kind of a plugin but with a different approach, but since yours is looking promising (and, I must admit, better) already, I’ll give and leave it up to you. But if you need some help or assistance, feel free to drop me a line.

    Reply
  5. Feb 22 2009

    I try Commentwitter Plugin Page :)

    Reply
  6. Feb 22 2009

    I try Commentwitter Plugin Page again :)

    Reply
  7. Mar 4 2009

    any last minute thoughts on Commentwitter before I potentially release it?

    Reply
  8. Mar 4 2009

    I integrated cli.gs API support so people with cli.gs accounts can keep track of tweeted comments. Now i’m trying to figure out a way to let people tweet their comments without using the Twitter API. This is turning out to be a larger problem than I originally thought.

    Reply
  9. Mar 5 2009

    Cleaned up the plugin a bit and getting ready for release.

    Reply
  10. Awesome idea. Now to mash it up with a post your comment to twitter bribe kind of reward system…

    Reply
  11. Mar 5 2009

    Nice idea. Testing out Commentwitter plugin.

    Reply
  12. One observation…

    It’s a little… disconcerting to send your comment off to twitter, only to discover that your comment is actually in moderation and no one who clicks through will actually see the full, in context, comment.

    Not sure exactly how you resolve something like that to a high level of satisfaction for both user experience and blog safety, but there is surely some approach that would allow bypassing moderation for real people who are also tweeting the comment.

    Reply
  13. Mar 5 2009

    @danemorgan as it stands you only have to be approved once before you can post without moderation. Other than that I guess if you really trusted whatever spam filtering service you were using you could just turn off moderation.

    Reply
    • Jul 2 2009

      @jon – I thought that this was actually defined in the admin options – for example every comment has to be approved on my blog, even for those who have commented before.

      I was thinking about writing this plugin myself, so did a quick search and found this plugin. There are a few things that I’ve found having tested it, and a few ideas I have as to what I would like to see.

      - if you use an @ reply in your comment to target the reply at a comment, this becomes an @reply on twitter – and the user name on twitter isn’t necessarily the same as the commenter’s name on your blog.

      - I’d like to see an admin option to change the text ‘send to twitter’

      - The option to change whether the comment itself is sent, or just something like “I’ve just commented on Post Title – check it out. link

      - Bit.ly integration/other url shortening services.

      Other than that, it’s a great plugin, thanks!

    • Jul 2 2009

      @epicalex Thanks for the feedback. I’m working on better ways of handling when the tweet gets sent to Twitter so that it only gets posted when you’re approved … or something like that.

      I’ve also begun integrating some personalaztion options into the admin panel that I hope to have ready for the next release.

      I like some of the other ideas for customization that you had as well and will definitely look into them.

      Thanks again man.

  14. Mar 5 2009

    Pretty cool, Jon. I plugged it in, gave it my WP API, and edited the “” line of code into the comments.php – I’m using the iNove theme (modded of course) and the section of code I had to put it right after was “” (with a [code] added before and after) and it works like a charm! Thanks

    Reply
  15. Mar 5 2009

    @Suthnautr I’m glad you were able to get it to work

    Reply
  16. Mar 6 2009

    Any ideas on why it won’t work for logged in users? I implemented it by pasting a copy on either side of the else statement testing for logged in / logged out users. When logged in clicking on the link sends me to the top of the page rather than opening the dialog.

    Reply
  17. Scratch that last comment. I somehow had removed my jquery inclusion from the theme header… [sheepish grin]

    Reply
  18. Mar 6 2009

    Great! This is pretty cool as a concept

    Reply
  19. Mar 6 2009

    hi. Thanks for plugin

    perfect.

    Regards

    Reply
  20. Mar 8 2009

    I added the new plug like said here but i dont see it on my site. Maybe i did something wrong.

    Reply
  21. Mar 10 2009

    Might give it a go !

    Reply
  22. An idea for improving commenttwitter. Since we are already asking the reader for their twitter ID, why not insert a small twitter icon linked to their Twitter Profile. It would be a nice thing to do for a reader who took the time to tweet their comment to our post.

    Reply
  23. Mar 11 2009

    @danemorgan I actually want to do that AND grab the persons Twitter avatar. Then I want to make it so you can reply to people by clicking on their name and it will add the @username to the comment so when you tweet it gets sent out as a reply.

    I was even thinking about threading the replies.

    Reply
  24. Apr 6 2009

    Updating the plugins on a couple of my wordpress blogs and will be trying out commentwitter.

    Reply
  25. Apr 6 2009

    Awesome idea. I’ll be putting this on my site for sure. Thanks.

    Reply
  26. Scot
    Apr 9 2009

    Hi

    Great plugin, but i wondered if this could be modified for use with WordPress’ Prologue theme, whereby you could insert the code within the post-form on the home page. I’ve tried this and, expectedly, does not work as it stands but perhaps with some tweaking?

    Cheers

    Reply
  27. Apr 10 2009

    I don’t see any “Appearance” tab in my admin. There’s only a Theme Editor not just “Editor” and the “Comments” tab doesn’t allow for any modifications or code input.

    Are you talking about editing the actual plugin?

    David

    Reply
  28. Apr 10 2009

    Ok, you mean go to your theme editor and plug this piece of code in. Got it.

    Thanks

    Reply
  29. Apr 28 2009

    Nice. Especially the fact that this plugin is a work in progress. Hope it evolves towards the ideas you have for it. Want to see what it does after I submitted the comment. Here goes :-)

    PS: I wondered what clicking the SEND TO TWITTER link will do – maybe a little radio button could do the trick.

    Reply
  30. Apr 30 2009

    Could you add an option in the admin panel to have all of the comments published to your own twitter? I would like to have my own twitter account updated with comments that are left (preferably after they have been moderated of course). It seems like that should be some simple functionality to add, would just need to capture the site admins twitter un / pw and then pass it through to a second function that would post the twitter message, just as it would if a visitor had entered their own un / pw.

    Just a thought.. it may increase your user base for this plugin also.

    Thank you.

    Reply
  31. Apr 30 2009

    @gerthough glad you liked commentwitter. i’ve been loving all the feedback i’ve been getting.

    Reply
  32. Apr 30 2009

    @postkarma i like your idea. i’ll look into how hard it might be to integrate that.

    Reply
  33. Apr 30 2009

    Jon

    Wondering if this plugin could also be tweaked to allow for Twitter crossposting from the post form in WordPress’ Prologue or P2 themes?

    Thx

    Reply
  34. Craig
    May 3 2009

    Strike that last comment Jon, I googled my php error and found that I needed to enable some features in my php.ini file. Thanks for the sweet plug-in!

    Reply
  35. thnks for this nice plugin john..gonna use this in my site..looking great..thnks a lot for creating such a nice plugin..

    Reply
  36. May 5 2009

    Good news from this plugin ;)

    Reply
  37. Andy Piper
    May 7 2009

    Isn’t this just a cheap rip off of the very cool and innovative TweetMeme button? Only it doesn’t have all the fun stuff that goes with it and the traction… I think I’ll be using the TweetMeme one it doesn’t have anywhere near as many issues as this one appears to have.

    Reply
  38. May 7 2009

    Andy: You obviously didn’t read my post or understand what the plugin is about. I’m also curious about these “issues” you say I am having.

    Hopefully you’ll give this plugin a second look and reconsider your opinion.

    Reply
  39. May 8 2009

    This is by far the best Twitter plugin for WordPress. Awesome Job!

    I installed this on a site I’m building, and as a person above stated, it would be a really neat function if the plugin could grab the person’s twitter avatar from their account. While I didn’t have the time to figure out how to do that, I did manage to rig up a little hack that links the commenter’s name to their twitter account:

    1. In wp-content > themes > [current theme] > comments.php, search for [value="Submit Comment"] and add [onClick="tweetLink()"] right after that.

    2. Copy and paste this code right before that input tag:

    function tweetLink() {
    document.commentform.url.value = ‘http://www.twitter.com/’ + document.commentform.twittername.value;
    }

    And as a sidenote, “You can also choose to ad a small note” should be “You can also choose to add a small note”, and “please considor donating a few bucks to support it’s development” should be “please consider donating a few bucks to support its development” (just trying to help).

    Reply
  40. May 8 2009

    Drew: Thanks man, that’s really great to hear. I actually really wanted to incorporate the avater/twitter name into the comments but my original method of doing so was squashed when Twitter changed their API so I couldn’t pull Twitter info with an email address.

    So now I’m thinking I’ll start saving Usernames (not passwords) of people that use commentwitter. Those people will have their Twitter avatar’s displayed with a little reply button that lets you reply to their Twitter name in the comment form. This way it shows up as a reply on Twitter. Great new way of notifying people of followups to blog post comments.

    Reply
  41. May 11 2009

    I’ve been thinking that normal comments should be posted to Twitter as replies to the post author.

    Reply
  42. May 19 2009

    I looks like twitter is supporting OAuth now, any chance you can add that to the plugin?

    Reply
  43. May 20 2009

    Since installing the plugin I get a validation output error from the W3C validator:
    Error Line 63, Column 139: Attribute language not allowed on element script at this point.

    …gins/commentwitter/commentwitter.js”>

    Seems to be that (js) that causes the problem.
    Is there anything I can do bring about validation?

    Reply
  44. May 20 2009

    @benwaynet I’ve been looking into ways to integrate OAuth seamlessly into the commenting process. It seemed easier before I actually started implementation. It’s still on my list of to-dos but has been put on the back burner to some other usability changes I need to make,

    Reply
  45. May 20 2009

    @johnbakeronline thanks John, I’ll fix that first chance I get.

    Reply
  46. solazy
    May 22 2009

    This’s a good element.

    Reply
  47. woops
    May 31 2009

    testing comments..

    Reply
  48. test
    Jun 10 2009

    test comment

    Reply
  49. Jun 16 2009

    I’m Testing…

    Reply
  50. Jun 17 2009

    Which I do not make correctly, the PlugIn make no Slide on my blog. It is only static available the twitter-login?

    Reply
  51. Jun 17 2009

    Its WordPress 2.8

    Reply
  52. Jun 25 2009

    CommenTwitter is a wonderful plugin. Thank you so much for creating it!

    Reply
  53. Scott
    Jun 29 2009

    This sounds like a cool plugin. I think I would give it a try if it didn’t require the user to type their password. I understand why you need them to do that but it just seems a bit creepy to the user (I don’t think your trying to be creepy. I understand Its just the only way it can work).

    Reply
  54. Bryce
    Jul 2 2009

    Two things:

    I am looking to remove the cli.gs link and link directly to the comment or post page using the name of the post at the end of each tweet. Or at least the text read more instead of a meaningless cli.gs URL.

    Also can I not remove the posted notification that includes the API links and have that be the name of the commenter?

    Reply
    • Jul 2 2009

      Unfortunately you can’t hyperlink text in Twitter so you can’t do the “more” thing. I can however make it so it uses your own custom URL.

      I could explain to you how to hack the file but then you couldn’t do future updates. I’ll try and work in a feature where you can turn off shortened URLs in the next version. (however this is not wise for most people)

      I’m not sure I understand the second part of your question.

    • Bryce
      Aug 4 2009

      I would appreciate if you could send over the updated code that includes a custom linking URL. Basically I just want it to be the exact URL from the rss feed, not tiny URL.

      I do have one question with regards to the tiny URL though – is this a part of the character count? If so and I can update the second question instead I would not need to adjust the tiny URL.

      With regards to the second question I noticed the following text being added after each post:

      9:17 AM Jul 21st from API

      Can I make the word API read and link to whatever I want?

  55. Jul 9 2009

    Love this for my bridal shows!

    Reply
  56. Jul 24 2009

    I am testing your plug-in

    Reply
  57. Aug 4 2009

    Updated Commentwitter to 1.5.1 and lost my rotating header images in an installation using iThemes’ FlexxPro theme. Deactivated your plugin and now the rotating header images are back where they should be. Wonder what would cause them to disappear upon updating the plugin. Maybe a coincidence, but deactivating Commentwitter did bring back my header images.
    Just letting you know in case others may have the same problem.
    Thanks, it was a useful plugin.

    Reply
    • Aug 4 2009

      Thanks for the feedback @tommylinsley … that’s an odd problem you’re having. I tried to recreate it but everything seemed to be working fine. Have you given it a second shot yet?

    • Aug 6 2009

      Jon, thanks for a quick reply.
      No, I haven’t given it a second shot yet.
      The header images are working now, so I hate to rock the boat, so to speak. I’ll post here if I do try it again.
      Gotta love WordPress. So useful, but so easy to break.

  58. Jinn
    Aug 5 2009

    Thank for your work this is exactly what i was looking for

    Reply
  59. Aug 16 2009

    Thanks for building this, Jon. Nice built-in output to Twitter without having to export blogcommenting to Disqus.

    A couple of minor suggested tweaks:

    - add a border=”0″ in the help icon, as it shows up with an ugly hyperlink square border on some browsers now. (Also suggest including that img in the plugin package, versus hosting it on your site).

    - plugin acts a little wonky on comment_popup, although still very functional. AJAX doesn’t work, and it double-tweets the comment: once with the specific comment permalink, and again with the post permalink. I realize almost nobody uses popup comments anymore — but I do :)

    Finally, a question: How does CommenTwitter handle Twitter outages/fail whales? The service has been crapping out a lot lately, and I’m concerned that it doesn’t hang my site during Twitter outages.

    Reply
  60. Mike Harrison
    Aug 18 2009

    Installed it and activated it but it doesn’t show up. We have WordPress 2.8.4. Any help?

    Reply
  61. Sep 9 2009

    This seems slick…I wish it would work with the TwitConnect plugin so they would have to enter credentials every time.

    Reply
  62. Gwzo
    Sep 22 2009

    I’m Testing…

    Reply
  63. Oct 4 2009

    Looks like cl.gs is shutting down by the end of October:

    http://mashable.com/2009/10/04/cli-gs-shut-down/

    Hopefully you’re planning on an update to CommenTwitter, replacing cl.gs with bit.ly (or even selectable URL shorteners)?

    Reply
    • Oct 5 2009

      Well that’s no good. Luckily I stay prepared for this sort of thing. I’ll need to go back and make sure everything is kosher but I should be able to get a new version of commentwitter soon with bit.ly support and possibly is.gd as well

  64. Oct 7 2009

    thanks for the plugin mate

    Reply
  65. Oct 7 2009

    You’re quick! I see the plugin’s been updated with bit.ly, good deal. Thanks!

    Reply
  66. Oct 9 2009

    Your plugin breaks javascript for people’s homepages and let me tell you why and what I had to do to fix it on my website.

    Line 4 of your commenttwitter.js searches for the element id = “twittername” but id=”twittername”does not exist on my homepage or any page where there are no comments, so it fails and ends up breaking other javascript on the page.

    I had to change at the bottom of commenttwitter.php the wp_head to ct_head:
    add_action(‘ct_head’, ‘Commentwitter_wp_head’);

    And then I added the following to my header:

    Which disables your commenttwitter.js on pages that are not single pages (which are usually the pages with comments).

    So, if you could fix your javascript to not be called when on pages without comments that would be perfect as my solution is not perfect if someone has comments on pages your plugin will not work.

    Reply
    • Oct 9 2009

      Thanks for giving me a heads up.

      I’ll try and rework it this weekend.

  67. Oct 9 2009

    Oh.. my code that I put does not show.. the header has something like:

    if(is_singular()) do_action(‘ct_head’);

    Reply
  68. Any chance of adding support for su.pr. That would be a great way to combine Twitter and StumbleUpon power in one little link.

    Reply
    • I thought I had made it out of your moderation queue.

    • Oct 11 2009

      Sorry about that. I checked my discussion settings and it is set so you should only need to be approved once. That’s very weird. I’ll see if I can;t get that fixed.

      But you also just gave me a good idea. I’m thinking I might be able to include an option in CommenTwitter where people can automatically be approved if they input their data and send their comments to Twitter. I think people might feel more inclined to post if they knew it would get posted right away and links in Twitter to your blog from CommenTwitter would always work (where as sometimes comments get stuck in moderation and the links from Twitter won’t go directly to the comment).

      I’ll start playing around with it but thought I would just throw it out there.

    • Oct 11 2009

      I ultimately want to create a little script I can use in both my plugins that will give people more URL shortening options. I’ll look more into what it would take to get su.pr in there.

  69. opalhair
    Oct 12 2009

    thanks for the plugin mate

    Reply
  70. Choonit
    Oct 12 2009

    COOL PLUGINS!

    Reply
  71. Elena
    Oct 15 2009

    Testing plugin

    Reply
  72. Oct 15 2009

    Any news on the OAuth functionality? With all the weird hacker link warnings all over Twitter this week, I think everyone’s a little more cautious about using their passwords. Would love this on my site, so I’m willing to wait for news. I’ve subscribed to follow up comments in hopes of an update. Great work on this!

    Reply
  73. ZLWO
    Oct 26 2009

    This is a really cool plugin for wp. Thanks

    Reply
  74. Nov 1 2009

    testing this out… looks neat!

    Reply
  75. Nov 1 2009

    wow. it worked. that is sweet!

    Reply
  76. Dec 25 2009

    Outstanding, saved me a ton of work on this… would be even better if we could use our own bit.ly API in order to track links clicked in the twitter posts created.

    Also, the ability to tweet comments posted to your blog with a link to the post is what really makes this plugin shine, looked for hours without finding something comparable. If you plan on adding more features, then I would suggest keeping them modular.

    Best and happy holidays!

    Reply
  77. Jan 11 2010

    Trying out Commentwitter on jonbishop.com

    Reply
  78. SO
    Jan 27 2010

    I’m having a problem with the index page showing an error:

    ‘document.getElementById(…)’ is null o not an object

    Reply
  79. John
    Mar 3 2010

    Thanks for the plugin!

    Reply
  80. Mar 23 2010

    Hei!

    Thanks for your nice plugin! Nice work! But there is one missing feature: if i send a comment to twitter, it will be great if a link to the post will be include my tweet. What your plans with this plugin? Maybe it will be a great feature?

    Reply
    • Mar 30 2010

      This shouldn’t be a problem. My plugin is not responsible for creating the shortlinks … this is the buttons job. I’ve yet to be able to recreate this problem.

  81. Apr 28 2010

    Thanks for the plugin!

    Reply
  82. Dinho
    May 30 2010

    Hello,

    I’m new to this plugin. Love the idea. Has oauth support been added allready?

    Reply
  83. Robert Scanlon
    Jul 9 2010

    Testing this CommenTwitter plugin!

    Reply
  84. Jul 12 2010

    Hey Jon,there’s a bug involving a tag in your plugin.

    A closing tag is missing when the “What’s this?” link is turned off.

    Reply
  85. Aug 25 2010

    How can I make this work with Extra Comment Fields plugin? As is, it only tweets the last field.

    Reply

Trackbacks & Pingbacks

  1. This Blog is now Comment Twitter enabled | Windmill on the Hill
  2. 7 Awesome Twitter Plugins for Wordpress - Blog by Jon Bishop
  3. Using Quality Wordpress Plugins
  4. 7 + 1 pluginuri wordpress pentru Twitter | Tutoriale wordpress
  5. Twitter tools for WordPress « Professional Free Wordpress Skins
  6. Twitter Plugins and Tools | BestBlogBox
  7. 10 nya WordPress Plugin v18-09 | ZtrixQ.se
  8. How Much Value Is In A ReTweet? - Blog by Jon Bishop
  9. Commentwitter - wordpress plugin at HcOmS
  10. 7 + 1 pluginuri wordpress pentru Twitter: Wordpress Romania
  11. 31 Useful Twitter Plugins For Wordpress To Choose From | 1stwebdesigner - Love In Design
  12. Collection of Free Useful Twitter Plugins For Wordpress | guidesigner.net
  13. Twitter Your Blog Comments With CommenTwitter
  14. CommenTwitter : Twitchum.com - Everything Twitter Related
  15. 100 tips on how to use Twitter for business – Part 2 | Position2 Blogs
  16. Carl Gardner’s new Head of Legal Blog | The Wardman Wire
  17. How Much Value Is In A ReTweet?
  18. 7 Awesome Twitter Plugins for Wordpress
  19. WordPress Wednesday: Commentwitter Plugin | BlueFur.com
  20. 40 Wordpress Plugins To Improve Comment Section | DesignBeep
  21. Blog Revised » Twitter Plugins for WordPress
  22. Menggabungkan Wordpress dan Twitter « mengedit itu mengenyangkan
  23. 40 Plugins de Wordpress para los comentarios - save ass
  24. Most Wanted Twitter Hacks and Plugins for WordPress
  25. Most Wanted Twitter Hacks and Plugins for WordPress | Best Web Magazine
  26. Most Popular Comment WordPress Plugins - Wsblogz.com – Web design magazine
  27. Cara Menggabungkan WordPress dan Twitter « Teddyleonard's Blog
  28. DivageekDesigns.com » Blog Archive » 10 Twitter Plugins For Wordpress

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments