Twitterbook: Update Twitter using Facebook Status
March 22nd, 2007
How to use Twitterbook to get the status from your Facebook account to update your Twitter.com status as well.
Twitter is the South by Southwest award winning social networking service that allows members to keep each other updated on what they are currently doing or thinking.
Facebook, another social networking service, was originally developed for college and university students but has been opened to anyone with an email address. Now with over 17 million accounts, Facebook allows users to keep a list of friends, blog, share photos—and post their current status.
Since I’m already using Facebook, I was somewhat hesitant when I first heard about Twitter. It sounded like another social networking site that seemed to have the same basic idea—letting your friends know what you’re currently doing. It was only after I saw some interesting mashups of Twitter with other services that I started to see the potential.
I still didn’t want to manage two different “status” accounts, and I thought: “Maybe someone wrote a script that lets you use your Facebook status to update Twitter.” After a bit of searching, I couldn’t find anything… so I decided to try writing it myself. I was lucky enough to find articles by Dave Dash on using Facebook to update Adium, and Gareth Rushgrove on posting to Twitter using PHP. Many thanks to both of them for making their code available!
Here’s the result: Twitterbook (what else?)
Download Twitterbook (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 the “Status” area beneath your profile photo click on the “See All” link to go to a page with the RSS feed for your status. 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.
If you have access to CHRON on your server, you could setup twitter.php to run automatically at set intervals. Otherwise you could bookmark your script and call it whenever you change your status in Facebook.
UPDATE: A new version of Twitterbook is now available.

Spending more time in Twitter than facebook (all the twitter tools make it easy), I would rather go the other way. Have twitter update my status in facebook. Any chance of having that?
Excellent idea!
Sadly, it would appear that SimpleXMLElement is not supported in older versions of PHP (I believe my host has PHP 4 installed). Any ideas for a workaround?
Stuart. You suggested this link in the comments of my blog. Thanks a lot. This is a nice piece of code. I like it a lot. Made a little bookmarklet. Looking to get a hold of CHRON on my host too.
Thanks!
Was just about to crack my own version together… and in my google search to see the mashups I found your link and went… phew!
I’m a huge fan!! Well done!
Nice job with this. Coupled with Facebook Mobile (m.facebook.com), this can completely supplant using SMS messages.
Btw, there’s a small typo in the code, line 23:
CULROPT_HEADER should be CURLOPT_HEADER
This is great, I’ll be trying this out as a cron job. In response to Jesse, as Facebook’s API doesn’t have any updating methods other than uploading photos, an app to do it the other way round is pretty impossible at the moment.
Did facebook take away the rss feed for your status?
Facebook still provides an RSS feed for your status. More info on the way Facebook handles feeds is available at: http://www.facebook.com/feeds/faq.php
Thanks stuart, I had to change my privacy info
Hi,
First up, great piece of software thanks.
Quick question / bug report. When I set twitterbook to run via cron job, and then update twitter via text or twitterific, the facebook status gets reposted after every twitter only update.
Is their any way to work around this?
Adrian
Just a thought…
couldn’t you just paste your facebook status feed into twitterfeed.com?
I think Facebook pulled this feature because I cannot find a link to my status feed anywhere. They only make a friends status feed available.
Another quick solution is to have a link to fbtwit in your bookmark bar and just hit that after making facebook updates
Any advice about setting up a cron?
cant find that rss feed anywhere… any tips?
I’m with you FIRE, I can’t either. I think Facebook changed something. All I can find is an RSS feed of all my friends’ status, and I certainly don’t want to populate my Twitter account with that.
Here’s how to find the RSS feed for your status:
1) Go to your profile
2) Under Mini-Feed click “See All”
3) Click on Status Stories
4) You will see a link labeled “My Status” under the View menu
Just followed the instructions in Andrews comment, and still can’t find my Facebook status RSS feed. Had a poke around with the privacy settings and couldn’t see anything that would change it..
Weird… I found it based on the instructions listed.
That’s really weird. It’s just not on mine at all, and I’ve seen other people I know having the same problem.
I just double checked and feeds are still available—the fastest method of finding it is through your mini-feed, like Andrew noted above.
There seems to be something strange going on, as almost everyone I know doesn’t have the RSS feed in the place that Andrew describes (and was kind enough to send me a screenshot of). I have written a short post on the issue here:
http://michael-pick.com/2007/07/04/are-you-a-facebook-rss-leper/
One theory in the comments is that this might be a US/Europe thing. Are the people unable to find the feed outside of the US? None of my Europe-based friends can access the feed. Need to check with a few more US friends to see if this is the issue.
My privacy settings are open wide, so it doesn’t look like this is the problem.
Weirdness indeed.
That’s not it. I’m in the US and I don’t have access to the feed – only to the feed for status updates of all of my Facebook friends.
Lane, that’s a bummer. I was hoping to nail it down to something at least.
The quest continues…
I wonder if it is down to when you signed up? Most people I know have accounts of less than a year old. Could this be a legacy thing for the original FB hardcore?
clutching at straws
Just in case someone is still interested in updating Facebook with Twitter, thanks to the Twitter application, it is now possible at the click of a button. Check it out… Mx
If anyone is looking for the feed try this:
http://hs.facebook.com/minifeed.php?filter=11
I get the RSS icon then.
A new version of Twitterbook is now available.