Twitterbook v2
// April 3rd, 2008 // Social Media
Twitterbook has been updated! Download the new script and use it to update your Twitter account with your Facebook status.
The first version of Twitterbook was released last year, and since then I hadn’t spent much time looking at social networking software, except for Facebook. At some point changes to one or both systems meant the script stopped working.
This was likely due to Facebook removing the ‘is’ from your status. Now users can post something like ‘Stuart has updated Twitterbook’, rather than trying to use ‘is’ creatively and say something like ‘Stuart is reflecting on how he updated Twitterbook’. Removing the ‘is’ also makes your Facebook status work a lot more like Twitter.
Even though I hadn’t posted to Twitter in over a year, I’ve been convinced to give it another try. There certainly seem to be more users now, technorati is indexing Tweets, and I could see how it might be helpful with creating a blog. Particularly if you’re more inclined to write short posts, like me.
Download Twitterbook v2 (4KB)
You’ll need to edit twitterbook.php before running it to include your personal information.
To find the URL for your Facebook Status Feed, first login and go to your “My Profile” page. In your Mini-Feed click on the “See All” link to view all the various updates you’ve made. Select the “Status Stories” view, and you’ll also see an option for viewing your Status as an RSS feed. Copy the URL for this feed and paste it into the twitter.php file where you see FULL_URL_FOR_YOUR_FACEBOOK_FEED. You will also need to enter the name that appears in your Facebook status updates where you see YOUR_NAME, as well as your Twitter login and password where you see YOUR_USERNAME and YOUR_PASSWORD respectively.
After updating twitter.php with your personal data, upload the file to a server running PHP. Anytime you go to the URL for the script it will check your RSS feed at Facebook and pass the information along to Twitter. You could run it anytime you update your Facebook status — or choose to only Twitter the status updates you want to make more public.
Let me know what you think of the script, status updates, Facebook and Twitter. Post a comment, or connect with me at twitter.com/designmeme.







Nice, thanks!
[...] final note: while I was writing this post, I came across Twitterbook, which does a similar thing with PHP. It does seem to require manually visiting the script’s [...]
Hi,
I’ve just tried to install this (following the instructions, i think!) and uploaded it to my server and get an error about
Cannot instantiate non-existent class: simplexmlelement
you can see it here.
http://lee.derbyproject.com/twitterbook.php
any clues? (im a n00b to twitter, so no clue how to connect to you yet!)
cheers!
Hi Lee,
It’s possible you don’t have CURL library installed with PHP wherever you’re getting your website hosted. Check to see what version of PHP they’re running and if they have CURL installed.
You can follow me on Twitter by visiting this URL and clicking the “follow” text under my profile picture:
http://www.twitter.com/designmeme/
It seems to work excellent, thanks for that mate!
Just wanted to say that this is really great.. Got it working in about 2 minutes and it is smooth as…
It’ll feature nicely on my upcoming site (I’ll credit appropriately
)
Good stuff.
Thanks for this great script! Do you plan on getting a “updated from twitterbook” parameter from twitter? That would be a great way to promote this.
Thanks again!
First I wanted to say that this is an excellent script. Saves me from having to write the same thing twice.
One thing though – I was running this every 15 minutes through cron, and didn’t realize for a couple days that it kept updating my status with the first item from my status feed. I tweaked the source to write the last item out to a text file, and only update Twitter if it has changed in the feed – http://harrywynn.com/projects/twitterbook.txt
@Harry: You wrote exactly the same solution (for exactly the same problem) as me!! I wish i’d read the comments before I took it upon myself to do that!!
Great script though!
Getting this error message using the scrip.
“Cannot instantiate non-existent class: simplexmlelement in /home/virtual/hank.dk/public_html/”
+ /*here is the rest of the URL that I wont post here */
“.php on line 16″
What can it be? What shall I ask my webhotel to do?
I’m a NOOB – sorry for the stupid question
Look like the new facebook doesn’t have mini-feed anymore !!!
This works perfectly! Very easy to set up. Plus using Harry’s txt made it work great as I do not want to be creating multiple updates of the same thing once I set up a CRONjob for the file.
The new facebook does still have mini-feeds. It is just named “Status Stories” and it is located http://www.new.facebook.com/minifeed.php?filter=11 there.
I would love to be able to update my facebook from twitter. Something a little more backwards as I use twitterfox to update my twitter from my broswer and it would be cool if there was a way to automatically update facebook as well … Perhaps someone would like to take up the challange, as I have zero knowledge on writting scripts or any kind.
@Aidan, the official Twitter app for Facebook does just that… just search for “Twitter” on Facebook.
Works like a charm! Wish I would have found this script earlier!
im still having some issues with the modified version of Harry;
:
Fatal error: Uncaught exception ‘Exception’ with message ‘String could not be parsed as XML’ in /home/www/web1/html/files/twitterbook.php:48 Stack trace: #0 /home/www/web1/html/files/twitterbook.php(48): SimpleXMLElement->__construct(”) #1 {main} thrown in /home/www/web1/html/files/twitterbook.php on line 48
@eiland
Sounds like there might be something in your feed that’s no parseable (ampersand perhaps). Contact me directly if you want some further help harrywynn [at] gmail [dot] com.