Twitterbook v2
by Stuart Robertson on 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.



Joe on April 8, 2008 at 8:41 am
Nice, thanks!
PyTwitFace: Twitter/Facebook mashup with Python at j4mie dot org on April 13, 2008 at 6:31 am
[...] 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 [...]
Lee on April 14, 2008 at 12:22 pm
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!
Stuart Robertson on April 14, 2008 at 12:46 pm
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/
Zootool on April 20, 2008 at 4:05 pm
Stijn on May 21, 2008 at 3:43 am
It seems to work excellent, thanks for that mate!
matt on June 5, 2008 at 6:35 am
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.
pamQ on June 29, 2008 at 4:30 pm
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!
Harry on June 29, 2008 at 8:34 pm
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
patrickandlydia.com on July 12, 2008 at 10:46 am
YouTube - Twitterbook: Using Facebook to update Twitter on July 15, 2008 at 10:57 am
James on July 18, 2008 at 8:50 am
@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!
Henrik Malmgren on July 26, 2008 at 3:14 pm
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
Jiradett on August 12, 2008 at 7:50 pm
Look like the new facebook doesn’t have mini-feed anymore
Aidan on August 17, 2008 at 3:47 pm
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.
Jason on September 16, 2008 at 12:59 pm
@Aidan, the official Twitter app for Facebook does just that… just search for “Twitter” on Facebook.
gavindew's Bookmarks on Delicious on October 3, 2008 at 1:27 pm
Inga on November 26, 2008 at 10:50 am
Works like a charm! Wish I would have found this script earlier!