Twitter Updater (a WordPress plugin)

The Twitter Updater automatically sends a Twitter status update to your Twitter account when you create, publish, or edit your WordPress post. You can specify the text for the updates, and also have the option to turn the auto update on/off for the different post actions in the admin panel.

Eg, when you edit a post, your Twitter gets updated with:

Fiddling with my blog post: Twitter Updater (a WordPress plugin) ( http://blog.victoriac.net/?... )

Instructions

  1. Download and unzip the Twitter Updater folder
  2. Upload and copy the twitter updater folder to your WordPress plugins folder (/wp-content/plugins/)
  3. Now you have to tell WordPress to activate the new plugin. You do this by going to your admin panel > Plugins. And click on 'Activate' next to 'Twitter Updated'. If you don't see Twitter Updater there, you may have copied the Twitter Updater folder to the wrong directory.
  4. Go to your WordPress admin panel, select 'Manage' at the top menu, then select 'Twitter Updater'.
  5. Enter your preference and your Twitter account details.
  6. Test by creating a new post!

Let me know if you find any bugs with it! It's my first WordPress plugin, so it may not be perfect.

Alternative versions by other contributors

(Let me know if you want me to add your link here.)

Victoria.....

Vitoria, hi :)

We need you to update teh Tweeter Updater! :(

There ar etwo bugs

1) Double Tweets

2) Schdeule WP post does not trigger the the twitter post :( It only triggers it when you post it manually.

Pleaseeeeeeeeeeeee

Follow me on http://www.twitter.com/colinfu
Raise Money For Charity whiel having a ball doing it -> http://www.ExtraordinaryBalls.com
Personal site -> http://www.colinfu.com

Love it

except for the double tweets.

Thanks for this nice Plugin

Hi,

Thanks for this nice Plugin !, I have installed on my wordpress 2.6 version, and it is working fantastic, i could not find it listed on the wordpress.org free plugins.

Great one,

Andy

------------------------------------------------------------------------------
Watch Free Tv Online

------------------------------------------------------------------------------

Oops

Aww.. Sorry. I will try again. The weather was unusually good last week so I got tempted and went out all weekend and didn't do any work..

So people are still using this plugin?? Wow. I'll try and see what I can do then. Guess the hooks might have changed in the latest version of WP. Thanks everyone for your patience!

Still anybody around to

Still anybody around to answer?

hm... another bug...

Ok, scheduled post on WP does not update on Twitter... Any chance to look into this please?

I know that you do not use WP anymore... but you have lots of fans... please do not abandon us?

Double tweet...

Victoria, any chance to sort out the double tweet ASAP please? :(

ok, it now works...

"interesting" bug... The solution is you ahve to check all the twteet options, as comes by default, then (remove) uncheck those option that you do not want... My "mistake" was I uncheck some of the default options at th every beginning...

Thanks Victoria! Awesome plugin! :)

Twitter Updated does not send updates...

Hi installed Twitter Updated on WP... but ot does not send updates to Twitter... when I update my blog?

One thing I realise i sthat the twitter account information that I filled in on Twitter Updated page on WP... ahs "empty" password even though I trie dto enter so many times. Is it maeant to be "empty" for [protection purpose or meant to show "********" as password?

Anyhow, please advise me ho wto get Twitter Updater to work?

Will fix soon

Hi,
Thanks for reporting about the double tweeting. It's hard to keep track of bugs because I don't use Wordpress anymore. But I'll take a look at it this weekend.

Debugging Updater

Any pointers on how to debug this? I've got two what I thought were essentially identical Wordpress installation. Updater works on one site but not the other.

Double Tweeting

This plugin with 2.6 is double posting. Please update the plugin. Thanks!

Thanks very much!!!

Thanks for this plug-in - this will save me no end of time faffing about!

Cheers, Dan

Follow Me on Twitter: http://www.twitter.com/danoneil
My Blog Feed: http://feeds.feedburner.com/personal_development

Double Tweeting

I have the same problem with double tweeting.
I added the Plug in in my Wordpress Blog 2.6 ( http://www.parsnewz.com/blog ) and read that I have to change the code as given below.
So I did it, but nothing changed I still have double tweeting.
I enabled only "Update Twitter when the new post is published" option, but nothing changed, still double tweeting.
It is a news Blog site and I edit to many posts, so I can't delete every time double tweeting, please help.
Thanks,

www.turkrapci.com

Ohqq, this isn’t working

Thanks!

Hi Victoria,

Just plugged this into my Wordpress site (www.littled.net). Working very well indeed. Thanks for developing this.
Cheers,
David

feed update difficulties

Hello all! After trying several different variations of the plug-in I've found my Twitter feed will only update once I've unpublished and re-published a post. The site is running WP 2.5x and is riddled with plug-ins:

Akismet
Dashboard Editor
DynamicAds
FeedBurner FeedSmith
Google XML Sitemaps
Peter's Collaboration Emails
Related Posts
Sociable
Twitter updater 2.01 (version updated by InGoal)
WordPress Automatic Upgrade
WordPress Database Backup
WP-Email
WP-PageNavi
WP Opt-in

Since no one else seems to be having this problem, I can only assume it's a plug-in conflict. However, I thought I'd stop in and see if there were any off-the-cuff suggestions before I start toggling plug-ins to weed out the culprit.

Thanks in advance. Have a great day.

EDIT: I've given the plug-in my Twitter user name vs. the registered email address.

Scheduled posts fix

Hey,
This is a little fix for post title. Post title is empty, in $_POST['post_title'], when scheduled post is posted. Around line 78 after "sentence = get_option('oldpost-edited-text');" add this:

if (strlen(trim($thisposttitle)) == 0) {
$post = get_post($post_ID);
if ($post)
$thisposttitle = $post->post_title;
}

Double-Tweeting

Indeed it does double-tweet...that's because WP2.6 introduced post-revisions (saving numerous versions of your post in the DB)...it gave me a headache too...

Just get the newest version of my version (v2.03 - see http://www.ingoal.info/archives/2008/07/08/twitter-updater/) it is compatible to WP2.6 ;-)

Double-Tweeting

It seems that Twitter Updater has been double-posting to Twitter every time I add a new post on my blog. I think this has been happening ever since I updated to WordPress 2.6. Has anyone else had this happen? How can I keep this from happening? I just want ONE tweet per blog post, not two!

Thanks,
kopper
GaragePunk.com

New version

I released a new Version yesterday. It is an edited version of Jonathan Dingman's version. I replaced the tinyurl-support with Support for zz.gd, which results in even shorter urls...Feel free to add a Link to it to your list: http://www.ingoal.info/archives/2008/07/08/twitter-updater/

Thanks for your consideration.

Ingo "Ingoal" Hildebrandt

nice

Tahnks a href=http://www.lot.com>lot.

easy hack to twitter plugin?

I have not tested it yet, since I cannot access the live system from here, but it seems like an easy hack to the twitter plugin:

In twitter_updater.php, use the get_the_title function instead of accessing the post title directoy. Generally it seems like a good idea to use functions instead of direct access, when possible.

BTW: is it possible to use HTTPS instead of HTTP to prevent username/password travelling in clear text?

<?php
function vc_twit($post_ID)  {
  
$twitterURI = "/statuses/update.xml";
  
$thisposttitle = get_the_title($post_ID);
//   $thisposttitle = $_POST['post_title'];
  
$thispostlink = get_permalink($post_ID);
  
$sentence = '';
?>

Twitter-Updater & Multi-Language Plugins

Hi,

I'm using twitter updater now on my blog on http://blogs.karroum.de/andreas and it works great, except for one thing: I'm also using qtranslate (http://www.qianqin.de/qtranslate/) to serve my blog in English and German. The problem is that new blog posts are now twitter as this(http://twitter.com/AndreasEK/statuses/784921934):
Published a new post: [lang_de]Automatische Twitternachrichten[/lang_de][lang_en]Automatic twitter notifications[/lang_en] ( http://tinyurl.com/5fvvom )

That's ugly, although I understand why that happens :(

1) Would it be possible to configure the Twitter-Updater so that it just takes the titel of the default language of qTranslate?
2) Is there any integration between Twitter Updater and another multi-language plugin?

Posting outside Wordpress

Hi there... i was loving your plugin until i make a post from my pocketpc... it does not appear on twitter... :S

Can you add this to your "bugs" list?

Try in the next version to improve this problem.

Keep the good work!!

www.joaorico.com

Windows Live Writer

I am also interested in a fix for posting from Windows Live Writer. I will take a look at the scripts myself to see if there's anything that can be done. Perhaps writing a Twitter plugin for WLW is the way to go instead.

UPDATE - I got it working. I changed this line in twitter_updater.php:

$thisposttitle = $_POST['post_title'];

to this:

$thisposttitle = get_the_title($post_ID);

Works great from WLW now.

Windows Live Writer

I saw a previous post where someone was having a problem when using Windows Live Writer. I, too, use Windows Live Writer and was having the same issue with Twitter not picking up the new post. (No problem using Wordpress proper to make posts - your plugin works fine there.)

Since it still doesn't work, I'm guessing there's no new news. Any progress being made? Shall I hold out hope that it may get fixed one day?

thanks

it is very useful, thanks a lot…

http://www.syria-soft.net

Publishing a delayed post

I use the Twitter plug in and I set it up only to post when I publish a new item. Only problem is that I usually publish to go up later in the day or week. Twitter still gets informed exactly when I post it.

Is there any way to set it up to send the Twitter when it posts to the site (check the timestamp and post then)?

Updates for comments

Hi Victoria,

I was wondering if your plugin would be able to send out notifications via twitter whenever someone posts a comment to the blog?

I would like to use this for a friend of mine who is a lecturer. We think the best way to drive his students to getting involved with his blog is to have alerts appear on their mobile phones. If they can also receive notifications when their peers comment I think that would be great.

Many thanks,

Scott.

New version with Tinyurl support

Johnathan Dingman has created a new version of the Twitter Updater with added Tinyurl support. You can get it here: www.firesidemedia.net.

Updating on unpublished posts

This is a great plugin, but I just figured out as I'm writing a post that, as it autosaves, it's posting to Twitter on an unpublished post. I think you need to modify your query to check for the post status and that will do the trick.

Mod

Hello everybody, I made some simple modifications to your plugin to use short URLs with your domain name.

-------------------------------------------------------

Hola a todos, he hecho unas sencillas modificaciones a tu plugin para poder usar URL's cortas con tu nombre de dominio.

http://ceritium.net/306/software-libre/wordpress/my-twitter-updater/

Adding a poll to your blog/forum (Wordpress)

Hey guys --

I know this is off-topic, didn't know where else to post on this blog :)

I found this cool site that lets you add polls using wordpress to your blog/forum. I'll link it --SodaHead Wordpress Plugin -- if you are interested, you should check it out :) it's pretty legit.

thanks

Hi Ralph, Sorry it didn't

Hi Ralph,
Sorry it didn't work for you! I got lazy and stopped fixing the problems. I've also moved my blog to using Drupal instead of Wordpress, so I'm no longer using the plugin, and it's harder for me to test it.

I'm aware that some people are having problems with it. Some users have managed to fix the problem.

One of them is James Cridland, he's written some very clear instructions on how you can apply the fix: http://james.cridland.net/code/twitterupdate.html

Let me know if you're still having problems, and I'll see what I can find! Very sorry I'm such a lazy sod!

So I've tried to install

So I've tried to install your plugin to my Wordpress Blog. I'm a total noob, as in I started Coding/Blogging yesterday. After I unzipped your Twitter download, and uploaded the folder with the two files, I activated it, entered my information (both email, and twitter user name) and it didn't add anything to my blog. Is there another step required???

Sorry about the newbie question. Any help would be appreciated.

Thanks!

Ralph.

great plugin! thanks!!!

great plugin! thanks!!!

Sorry.. I know this is

Sorry.. I know this is horribly unsophisticated for me to copy and paste the comments.. but it is too complicated moving the comments over when I move my blog from WordPress to Drupal.

  1. Ken Camp Says:

    I’ve fiddled with the plugin a bit and I’m stymied. It doesn’t work at all for me. Wondering if I need to chmod on the plugin files permissions to get it working? It shows up and configures, but never actually updates Twitter at all. Curious. Love the idea! Tx!

  2. Victoria Says:

    Hrmm that’s strange. It does work perfectly for me (I’ve just tested it again a min ago). I’m using Wordpress 2.0.3, I think. Not sure if that would matter.

    The file that does the sending is the same file that does the form actions, so if you could see the admin panel and configure things, the file permission should be ok. Basically what the plugin does is that it uses fsockopen to post a form with the update details to the Twitter API.

  3. Victoria Says:

    Or have you installed other plugins that has to do with the process of post saving? It is unlikely, but there could be a clash with another plugin.

    Also, just to be sure, maybe you could key in your username and password on the Twitter Updater admin page again, just to be sure you got it correct? I should have written it to give a warning when the login fails, I don’t think it currently does that yet.

  4. Nick Cornaglia Says:

    Not working for me either. When I enter my phone number and password…I cant tell if it’s getting saved or not. It just goes to the top of the screen and those fields revert to blank.

  5. Nick Cornaglia Says:

    BTW…I’m using version 2.0.4

  6. Nick Cornaglia Says:

    BTW….you cant Manage the Plugin until you activate it. Though most can figure that out…you may want to reverse your instructions. :)

  7. Victoria Says:

    Oh right! Thanks for pointing that out! I’ve just updated the instructions. I still can’t figure out why it wouldn’t work for you… I’ll modify it abit and test it again.

  8. Victoria Says:

    Oh. I know why. I\’ve just been to the API page, it says that the API login has to be your email address. I must have gotten confused because the login at Twitter lets you login with your mobile number too.

    I have now updated the plugin so it tells you to use your email address to login instead. I have also modified it so it shows the last email address that you have entered. It will not show the password however, since that is not stored, only an encrypted combination of the email and password is stored in the database.

    Sorry about the confusion, and thanks for your feedback, it should work now if you login with your email instead!

  9. Ken Camp Says:

    Awesome. Works for me now. Thanks Victoria!! Cool plug-in.

  10. Victoria Says:

    Yay!

  11. Nick Cornagalia Says:

    Just figured that out myself and came here to tell you. You got it before me! :) Good Work!

  12. Mark Coates Says:

    Awesome plug-in, Victoria! Thanks for making it. :)

  13. Victoria Says:

    Thanks everyone! I’m so glad that people are actually using it. It’s my first plugin. :)

  14. Nick Cornaglia Says:

    No. Thank YOU! Keep em coming! How about an opposite plugin that posts your twitter into your wordpress blog? :)

  15. Victoria Says:

    Yea, I’ve been thinking of something like that. I’m going to revamp this website, and I thought I would write something to include some Twitter stuff on the index page of my blog. Something a bit more than the Flash thingy that Twitter has provided.

    Or maybe append something to every post like ”10 mins before writing this Victoria twittered ’blah blah’..”. Hrmm not sure how that would work, since some of the twitter updates can seem meaningless taken out of context. I’ll have a think about it, thanks for your suggestion!

  16. Mark Coates Says:

    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/.ghostwalker/findlawt/oddlyzen.com/wp-content/plugins/twitter_updater.php on line 15

    any idea why? this isn’t working for me… when i save options. :-(

  17. Matthew Says:

    Hey, did you get to speak to Ben Ward at last night’s meet-up? He’s done a load of work on Twitter widgets, and was talking about the potential for mash-ups like this.

  18. Victoria Says:

    Hi, it seems that it is deprecated to pass arguments to the function with ‘&’ to indicate pass by reference. I’ve removed the ampersands, so it should work for you now if you download and replace the twitter updater files again.

    Sorry about that! My PHP is rather rusty!

  19. Victoria Says:

    Matthew:
    No, I was in a bitchy mood and did not get to talk to any of the geeks other than James Wheare and the Torchbox people. So which Ben Ward was it? The Oxford one or the Birmingham one?

  20. Mark Coates Says:

    Oh, you are a goddess. Thank you - all is well in WP/Twitterdom. ;-)

  21. Victoria Says:

    Yay! (again.. Wordpress thinks this is a duplicate comment..)

  22. Nick Cornaglia Says:

    Hmmmm….working very inconsistently. Didn;t post my last blog entry. I think I’ll download it again and see if I can get it to work again.

  23. Nick Cornaglia Says:

    Downloaded and installed again. Reactivated. Entered my username amail and password again. Still didnt post to twitter.

    Actually, I figured it out. It doesn’t post to twitter when I use Microsoft Live Writer. Only when I publish from the online interface.

    Any way to change that?

  24. Victoria Says:

    Hrmm I’ll take a look at Microsoft Live Writer and see what I can do.

  25. MK Says:

    Thanks Victoria - great idea for a plugin!

  26. Victoria Says:

    I can’t seem to get LiveWriter to work for me at all. I know it uses xml rpc… The problem probably lies in it not calling the hooks, or calling a different hook when creating a new post, and thereby not triggering the Twitter updater.

    I’ll look into it.

  27. Nick Says:

    Thanks, I’ll keep checking back!

  28. Señor Epiphyte Says:

    This is an excellent implementation. Thanks for such an easy and full featured plugin for Twitter and Wordpress. -SE

  29. Corey Says:

    Any chance you can get the plugin to update twitter only AFTER the post timestamp actually publishes the post? I’ve made a couple posts with a future release timestamp, but the plugin makes the post appear on twitter as soon as I hit the publish button.

    Thanks for the great plugin!

  30. Corey Says:

    just want to reiterate how much I love this plugin. even if I don’t get my dream of the future post functionality, this plugin is awesome.

  31. Victoria Says:

    Aww.. Thank you! I’ll look at your request when I have the chance, but it may not be too soon unfortunately.

  32. David Chartier Says:

    LOVE the plugin, but have a request: is there any way to keep it from sending a Twitter update until a post-dated post is published? I set a post up for 24 hours in the future, but Twitter was updated immediately with a link to the post.

  33. Kenneth Udut Says:

    http://simplify3.wordpress.com/2006/12/10/hello-world/trackback/

    I’m going to check out your Twitter Plugin for WordPress [since that’s what I’m using for my Twitter Submitter] - and now, my blurb.

    http://www.zen72119.zen.co.uk/TwitterSubmitter/

    to see Twitter Submitter in action or download the simple to modify HTML at:

    http://simplify3.wordpress.com/2006/12/10/hello-world/trackback/

    Twitter Submitter works on any browser, any computer system. It allows you to post updates to your Twitter blog. I wrote it as I have a Win95 system and enjoy using Lynx and Opera, and all of the nifty apps accessing the Twitter API are too complex, confusing for me, or only work on a Mac or Vista system!

    Also found through: http://twitter.pbwiki.com - Twitter Fan Wiki, among other places!

    Kenneth Udut
    simplify3@aol.com
    http://twitter.com/simplify3
    Bringing Web2.0 to the Web1.0 world!

  34. Mike Cohen Says:

    When I post from MarsEdit, Twitter Updater sends two updates, both saying ‘fiddling with my blog’ rather than new post.

  35. Victoria Says:

    Oh no.. I’m sorry if it isn’t working for you. The events hooks are abit hacky, since it is not very well implemented/documented on WordPress. So what works for me might not be working for updates using different clients. Hrmm.. I’ll look into that again when I have time and see what I can do about it.. Sorry!

  36. John Says:

    Just wanted to say, I love the plugin, works great. Keep up the good work.

  37. Dan Says:

    I love the plugin- but I wish there was a way that post dated posts would not get posted over to twitter before they go online.

  38. Caiek Says:

    So much spam (

  39. Edasi Says:

    Spam really sucks( delete it

  40. Alan Says:

    Yay! It works, I love this stuff.

    One interface design gotcha. IN my rush to configure, I set all my post options and my accounts, but overlooked that the Twitter account portion was a separate form submission, so I managed the first time to not save my twitter account log in details.

    Of course, chalk this up to user stupidity and not reading closely.

    Happilty twittering while blogging

  41. Corey Says:

    did this plugin break for anyone else with twitter’s recent update?

  42. Dave Says:

    Nope, seems they broke it. :/

  43. Victoria Says:

    Oh no! Indeed it is broken for me too! :( Don’t know when I’ll get a chance to fix this… meanwhile if anyone wants to try fixing it, just help yourself. Sorry!

  44. Alan Says:

    Yep, no updates twittered via plugin; fire them an email, they were pretty responsive to a previous request, maybe they changed the API

  45. Señor Epiphyte Says:

    No updates via the plugin (but also the same issue with the IM feature they provide), what is going down?

  46. Dave Says:

    Sent them an e-mail recently regarding their API, the reply was that nothing has changed, so they don’t know of any problem… though I can’t get any form of update to work through their API, so I don’t know what’s going on.

  47. James Cridland Says:

    I got it working. I’ve rewritten one function.

    http://james.cridland.net/code/twitterupdate.html to see what to change.

  48. Dallas Freeman Says:

    Can you let me know when you get it working again please.

    Pretty please!

    I love the plugin ( even though I haven’t been able to use it yet :( )

  49. Victoria Says:

    Ah great! Thank you, James!

  50. tyler Says:

    Hi Victoria!

    Great plugin, looks very promising. One thing though, the plugin writes “Fiddling with my blog post” to twitter even if the post I’m saving isn’t published yet. Perhaps I’m just expecting the wrong functionality and this behavior is correct. Just thought I’d give you a heads up.

    Thanks Victoria! Looking forward to future releases.

  51. Sylvain Says:

    I have a twitter account, i’ve installed folowing instruction your plugin but new post don’t post on twitter :(

  52. Boje Says:

    Same on my blog (WP 2.1.2)

  53. SPeedY_B Says:

    Here’s some working PHP which I’m currently using: http://speedyb.co.uk/news/twitter.phps :)

  54. Christopher Kinniburgh Says:

    Yeah, this isn’t working… :(

  55. GramBorder Says:

    Hi all!

    I want to all of you know, World is mine, and yoursite good

    Bye

  56. Brett Says:

    Does not appear to be working on my 2.1.2 blog either. :/

  57. Tanner Brockwell Says:

    Replace twitter_updater.php with
    http://www.tannerbrockwell.com/twitter_updater.txt
    rename to .php extension.

    Where it says enter email address supply your twitter username instead.

    Add me on twitter if you found this usefull!
    http://twitter.com/tannerbrockwell

    –Tanner

  58. chatca Says:

    very cool plugin to increase wordpress performance

  59. Dondado Says:

    it’s not working for me on wp 2.1.2

  60. Nicki Says:

    I was not able to get this working, HOWEVER James Cridland’s fix works great!

    Thank you for making this plugin, Victoria. And thank you, James, for posting the fix. :D

  61. morganusvitus Says:

    The site looks great ! Thanks for all your help ( past, present and future !)

  62. ia Says:

    Tried this and didn’t work. :( Using 2.0.4 :(

  63. Rudd-O Says:

    Under which license is this code distributed?

  64. Victoria Says:

    Hi Rudd-O,
    You can do what you like with it. But it would be nice if you could drop a comment or a link here about what you’ve done to it if it would benefit the other users.

    Have fun!
    - Victoria

  65. Thorsten Says:

    Thanks for this nice Plugin.

    We have rewrite your Plugin, to work on wamadu.de.

    It’s a german twitter clone, with a similar api.

    :thorsten