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.

73 Responses to “Twitterbook: Update Twitter using Facebook Status”  

  1. Gravatar Icon
    1 Jesse

    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? ;)

  2. Gravatar Icon
    2 Karen

    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?

  3. Gravatar Icon
    3 Taylor

    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!

  4. Gravatar Icon
    4 Andrew Kumar

    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!

  5. Gravatar Icon
    5 Shaun Haber

    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

  6. Gravatar Icon
    6 Nick

    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.

  7. Gravatar Icon
    7 Brad

    Did facebook take away the rss feed for your status?

  8. Gravatar Icon
    8 Stuart Robertson

    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

  9. Gravatar Icon
    9 Brad

    Thanks stuart, I had to change my privacy info

  10. Gravatar Icon
    10 Adrian

    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

  11. Gravatar Icon
    11 engtech

    Just a thought…

    couldn’t you just paste your facebook status feed into twitterfeed.com?

  12. Gravatar Icon
    12 Mike Steinbaugh

    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.

  13. Gravatar Icon
    13 Austin

    Another quick solution is to have a link to fbtwit in your bookmark bar and just hit that after making facebook updates

  14. Gravatar Icon
    14 Taylor

    Any advice about setting up a cron?

  15. Gravatar Icon
    15 FIRE

    cant find that rss feed anywhere… any tips?

  16. Gravatar Icon
    16 Jeremy Fuksa: Creative Generalist

    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.

  17. Gravatar Icon
    17 Andrew

    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

  18. Gravatar Icon
    18 Alex

    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..

  19. Gravatar Icon
    19 Jeremy Fuksa: Creative Generalist

    Weird… I found it based on the instructions listed.

  20. Gravatar Icon
    20 Alex

    That’s really weird. It’s just not on mine at all, and I’ve seen other people I know having the same problem.

  21. Gravatar Icon
    21 Stuart Robertson

    I just double checked and feeds are still available—the fastest method of finding it is through your mini-feed, like Andrew noted above.

  22. Gravatar Icon
    22 Michael

    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.

  23. Gravatar Icon
    23 Lane

    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.

    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.

  24. Gravatar Icon
    24 Michael Pick

    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

  25. Gravatar Icon
    25 Mark Knight

    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

  26. Gravatar Icon
    26 Alex

    If anyone is looking for the feed try this:

    http://hs.facebook.com/minifeed.php?filter=11

    I get the RSS icon then.

  27. Gravatar Icon
  1. 1 bitful
  2. 2 My iGeneration
  3. 3 Michael Pick
  4. 4 | Berlind’s Testbed | ZDNet.com
  5. 5 IDT Labs
  6. 6 atlbloggers.net : Home of Atlanta Bloggers
  7. 7 Mostly Muppet Dot Com
  8. 8 J. Karen Parker
  9. 9 J. Karen Parker's LiveJournal
  10. 10 the boost ventilator global network — ß∞$τ √∑π†!£@+0®
  11. 11 Born to be Mild
  12. 12 Twitter and Facebook Status at srhaber.com
  13. 13 TBeseda » If I Was Mark (Zuckerberg)
  14. 14 red hot place
  15. 15 Technologist For Hire » Blog Archive » Updating Facebook status using PHP
  16. 16 Updating Facebook status using PHP | Technologist For Hire
  17. 17 alexandrasamuel.com
  18. 18 Web “2.0″ Application Development, Design & Innovation in Cape Town
  19. 19 Your Group of Web AddiCT(s);
  20. 20 dotKenneth’s Blog - Obligatory Monthly Geek-Out
  21. 21 dotKenneth.com
  22. 22 twitter spam
  23. 23 Meaningless musings
  24. 24 links for 2007-05-19 « Tyrants & Tax Collectors
  25. 25 Drive Through… » Federated status
  26. 26 Drive Through… » Federated status
  27. 27 Vivendo a vida em novos tempos.
  28. 28 Chris Riley - cgriley.com - Blog, photos, genealogy and more
  29. 29 Nate Klaiber
  30. 30 Nate Klaiber
  31. 31 Twitter / danyork
  32. 32 dotKenneth.com - Obligatory Monthly Geek-Out
  33. 33 StumbleUpon » Your page is now on StumbleUpon!
  34. 34 Discover From Your Favorite Topic or Web Page: phpldapadmin.sourceforge.net/
  35. 35 How to win in the Twitter vs. Jaiku battle | Webware : Cool Web apps for everyone
  36. 36 MichaelRog's Bookmarks Tagged With "re-wrc"
  37. 37 Facebook Status - Dogpile Web Search
  38. 38 Coactlab
  39. 39 orangefever :: o5
  40. 40 world according to ack ~ adam karas » the blog of Adam Karas on b2b, usability, web 2.0 and a dash of NYC & Hoboken
  41. 41 No Categories
  42. 42 The Surgery - weblog of Dr Ron, panelist on Australia's very own Tech Talk Radio
  43. 43 digital footprint
  44. 44 Personal Site Of Harry J. Wynn IV
  45. 45 Cheap airline tickets.
  46. 46 KCNN: Useful Twitter Tools

Leave a Reply