Use Greasemonkey to extract your Facebook Phonebook

7/19/2010 UPDATE: There is a BRAND NEW version of the script available on Userscripts here.
10/12/2009 UPDATE: Added fixes from Marcel Chastain
UPDATE: It looks like the version that got uploaded was missing a * in the trigger URL! That might be the issue everyone is having.
UPDATE: Video of the process: fbimport

Facebook’s API + FBConnect is great but it has some severe limitations. Notably, it doesn’t expose all the functionality available on the Facebook  site. Tonight in particular, I wanted to be able to copy a dump of my friends’ names and phone numbers off the site to load into a fresh cell phone. Unfortunately, looking at the API this isn’t possible.

Never fear – Greasemonkey provides enough of a hook into Firefox that it would be possible to write a UserScript to accomplish this loans-cash.net.

Continuing beyond this point is probably against the Facebook TOS and will probably severely void your warranty.

You have been warned.

The following describes how to use this userscript to extract your Facebook “Phonebook”. It produces of a CSV of your friends’ names and phone numbers. Fair warning – this is a rough prototype and does almost no error handling. Also, since the “Phone” field is a free text field I can’t promise people will have formatted their numbers in any sane fashion. But either way it’s a good start to revering lost numbers.

займы онлайн на карту круглосуточно

So here is what you need to do to use the script:

1. Install Greasemonkey – https://addons.mozilla.org/en-US/firefox/addon/748

2. Follow these instructions to install the script – http://userscripts.org/about/installing

Edit: The script is also on Userscripts at http://userscripts.org/scripts/show/43681

3. Navigate over to http://m.facebook.com/friends.php? (You’ll have to login)

4. Answer yes to the prompt and sit back – the script will move through your phonebook and eventually dump you a CSV of the results.

5. Copy/Paste the CSV wherever you want.

6. Un-install the Greasemonkey script.

So that’s it, one less walled garden to worry about. And hopefully one less “I lost my cellphone!” event/group on facebook!

The script:

Facebook Phonebook Exporter

JSON explorer for Firebug!

As Firefox plugins go, Firebug is definitely one of my favorites. It has saved me and the rest of the Setfive team dozens of development hours. One of the nicest features of Firebug is the NET panel. The NET panel allows a developer to monitor HTTP requests that Firefox is making during the course of a page’s execution. This is particularly useful to AJAX heavy applications because it allows a developer to easily debug XHR requests and responses.

Although this is great, the NET panel is severely lacking when it comes to dealing with JSON responses. Since JSON must be a legal JavaScript string, it can’t contain any line breaks. As a consequence, debugging long JSON strings is extremely painful.

This issue has been on the Firebug TODO list for some time. I figured this would be a good place to jump into the Firebug codebase. I dropped an email to the Firebug working group and received some great feedback. Honza gave me a template extension to extend the NET panel and provided some great insight and advice on implementing a JSON viewer.

After a couple of weeks of intermittent work, the JSON-Viewer extension is ready to play with. Honza has committed the code into the Firebug 1.4+ branch so if you grab a new build you’ll be able to use the JSON viewer.

Screenie:

Read more at Honza’s blog post

Launched Wikia Evolution!

So I spent the summer working over at Wikia Inc as an engineer on their search project – http://re.search.wikia.com

Last month I wrote a Firefox 3.0 extension which launched yesterday – https://addons.update.mozilla.org/en-US/firefox/addon/8267

From the official Wikia blog:

One of our core values at Wikia Search is Community. We want everyone to be able to participate in the Wikia Search project. That’s why we are proud to introduce Wikia Evolution, our new Firefox toolbar. You can download it here, or via Mozilla’s Firefox Add-On Library.

The mission of Wikia Evolution: To empower users to interact with search.

We want to make it dead-simple for you to add URLs into our index under appropriate keywords. Already, we’re the cutting edge when it comes to incorporating user feedback into our search results, so much so that Google is experimenting with eerily similar features. Wikia Evolution pushes the envelope even further. It allows you to quickly and easily add the web page you are on into Wikia Search, directly from your browser, for whatever keyword is appropriate. Instant indexing! Then, you can modify the search result to make it really killer, all without leaving the page you’re on.

The release was even covered by Techcrunch!

http://www.techcrunch.com/2008/08/06/wikia-evolution-to-help-suck-search-data-from-google-yahoo/

Like everything at Wikia, the toolbar is open source. A public SVN is up at http://people.swlabs.org/~bartek/websvn/listing.php?repname=SearchUI&path=%2Fcool%2Ftoolbar%2F and you can download the code from the Mozilla add-ons site.