Twitter Updater (a WordPress plugin)
Sun, 19/11/2006
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/?... )
Let me know if you find any bugs with it! It's my first WordPress plugin, so it may not be perfect.
(Let me know if you want me to add your link here.)
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 = '';
?>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?
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!!
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.
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?
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)?
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.
Johnathan Dingman has created a new version of the Twitter Updater with added Tinyurl support. You can get it here: www.firesidemedia.net.
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.
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/
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 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 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.
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.
November 20th, 2006 at 11:32 pm
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!
November 21st, 2006 at 8:00 am
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.
November 21st, 2006 at 8:04 am
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.
November 21st, 2006 at 6:17 pm
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.
November 21st, 2006 at 6:22 pm
BTW…I’m using version 2.0.4
November 21st, 2006 at 6:27 pm
BTW….you cant Manage the Plugin until you activate it. Though most can figure that out…you may want to reverse your instructions. :)
November 21st, 2006 at 8:32 pm
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.
November 21st, 2006 at 8:58 pm
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!
November 21st, 2006 at 9:14 pm
Awesome. Works for me now. Thanks Victoria!! Cool plug-in.
November 21st, 2006 at 9:40 pm
Yay!
November 23rd, 2006 at 1:07 am
Just figured that out myself and came here to tell you. You got it before me! :) Good Work!
November 24th, 2006 at 8:33 pm
Awesome plug-in, Victoria! Thanks for making it. :)
November 25th, 2006 at 12:24 am
Thanks everyone! I’m so glad that people are actually using it. It’s my first plugin. :)
November 28th, 2006 at 1:25 am
No. Thank YOU! Keep em coming! How about an opposite plugin that posts your twitter into your wordpress blog? :)
November 28th, 2006 at 8:21 am
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!
November 30th, 2006 at 2:59 pm
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. :-(
November 30th, 2006 at 8:57 pm
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.
November 30th, 2006 at 11:08 pm
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!
November 30th, 2006 at 11:14 pm
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?
December 1st, 2006 at 1:02 am
Oh, you are a goddess. Thank you - all is well in WP/Twitterdom. ;-)
December 1st, 2006 at 6:30 pm
Yay! (again.. Wordpress thinks this is a duplicate comment..)
December 3rd, 2006 at 4:42 am
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.
December 3rd, 2006 at 4:53 am
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?
December 4th, 2006 at 9:46 pm
Hrmm I’ll take a look at Microsoft Live Writer and see what I can do.
December 6th, 2006 at 11:41 am
Thanks Victoria - great idea for a plugin!
December 14th, 2006 at 12:10 am
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.
December 31st, 2006 at 4:42 am
Thanks, I’ll keep checking back!
January 8th, 2007 at 12:58 am
This is an excellent implementation. Thanks for such an easy and full featured plugin for Twitter and Wordpress. -SE
January 16th, 2007 at 9:05 pm
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!
January 16th, 2007 at 9:09 pm
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.
January 19th, 2007 at 6:16 pm
Aww.. Thank you! I’ll look at your request when I have the chance, but it may not be too soon unfortunately.
January 21st, 2007 at 5:31 pm
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.
January 22nd, 2007 at 4:26 pm
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!
January 26th, 2007 at 6:04 pm
When I post from MarsEdit, Twitter Updater sends two updates, both saying ‘fiddling with my blog’ rather than new post.
January 29th, 2007 at 6:54 pm
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!
January 30th, 2007 at 2:43 pm
Just wanted to say, I love the plugin, works great. Keep up the good work.
February 2nd, 2007 at 4:25 am
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.
February 3rd, 2007 at 12:39 pm
So much spam (
February 3rd, 2007 at 3:42 pm
Spam really sucks( delete it
February 3rd, 2007 at 4:50 pm
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
February 9th, 2007 at 4:23 pm
did this plugin break for anyone else with twitter’s recent update?
February 12th, 2007 at 11:03 am
Nope, seems they broke it. :/
February 12th, 2007 at 8:31 pm
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!
February 17th, 2007 at 6:14 pm
Yep, no updates twittered via plugin; fire them an email, they were pretty responsive to a previous request, maybe they changed the API
February 24th, 2007 at 5:59 pm
No updates via the plugin (but also the same issue with the IM feature they provide), what is going down?
February 26th, 2007 at 11:08 am
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.
March 4th, 2007 at 5:57 pm
I got it working. I’ve rewritten one function.
http://james.cridland.net/code/twitterupdate.html to see what to change.
March 7th, 2007 at 6:33 am
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 :( )
March 7th, 2007 at 7:05 pm
Ah great! Thank you, James!
March 10th, 2007 at 12:48 pm
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.
March 12th, 2007 at 12:42 pm
I have a twitter account, i’ve installed folowing instruction your plugin but new post don’t post on twitter :(
March 13th, 2007 at 10:27 am
Same on my blog (WP 2.1.2)
March 16th, 2007 at 7:27 pm
Here’s some working PHP which I’m currently using: http://speedyb.co.uk/news/twitter.phps :)
March 18th, 2007 at 9:01 pm
Yeah, this isn’t working… :(
March 20th, 2007 at 7:55 am
Hi all!
I want to all of you know, World is mine, and yoursite good
Bye
March 21st, 2007 at 8:18 am
Does not appear to be working on my 2.1.2 blog either. :/
March 23rd, 2007 at 12:05 am
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
March 27th, 2007 at 4:01 pm
very cool plugin to increase wordpress performance
March 28th, 2007 at 9:08 pm
it’s not working for me on wp 2.1.2
March 29th, 2007 at 7:41 pm
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
April 5th, 2007 at 9:02 pm
The site looks great ! Thanks for all your help ( past, present and future !)
April 11th, 2007 at 7:12 pm
Tried this and didn’t work. :( Using 2.0.4 :(
April 19th, 2007 at 5:23 pm
Under which license is this code distributed?
April 19th, 2007 at 8:14 pm
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
April 26th, 2007 at 10:24 am
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