Twitterbook v2

April 3rd, 2008

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.

13 Responses to “Twitterbook v2”  

  1. Gravatar Icon
    1 Joe

    Nice, thanks!

  2. Gravatar Icon
    2 Lee

    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!

  3. Gravatar Icon
    3 Stuart Robertson

    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/

  4. Gravatar Icon
    4 Stijn

    It seems to work excellent, thanks for that mate!

  5. Gravatar Icon
    5 matt

    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.

  6. Gravatar Icon
    6 pamQ

    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!

  7. Gravatar Icon
    7 Harry

    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

  8. Gravatar Icon
    8 James

    @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!

  9. Gravatar Icon
    9 Henrik Malmgren

    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

  1. 1 PyTwitFace: Twitter/Facebook mashup with Python at j4mie dot org
  2. 2 Zootool
  3. 3 patrickandlydia.com
  4. 4 YouTube - Twitterbook: Using Facebook to update Twitter

Leave a Reply