Export Facebook Phonebook as CSV File
Posted By Keith Dsouza On December 15, 2009 @ 12:07 am In How To | 12 Comments
If you are a Facebook [1] user, many of your friends might have phone numbers which they share with you. If you have a large number of friends, copying and pasting them to your external contact list can be quite a pain.
Export Facebook Phonebook is a handy Greasemonkey [2] script which will allow you to export all the phone numbers and few other additional details like Name, City, etc from your Facebook account as a CSV file.
The script does not work out of the box as it is for two reasons. First is because Facebook does not use outright URL’s, and instead appends the navigation to the current URL. So in order for this to work, you will have to directly load the phonebook URL. Also the shortcut key assigned for this script Ctrl + Shift + Dis the browser’s bookmark shortcut, which does not get overridden.
Step 1: Install the Greasemonkey add-on [3] for Firefox if required, and then install the Export Facebook Phonebook Userscript [4].
Step 2: Login to Facebook and click on this URL [5] to open the Facebook Phonebook page.

Step 3: Go to the Greasemonkey menu and select Export Facebook Phonebookfrom the User Script Commands sub-menu. Clicking on this should update the current page in rapid succession, however, that is the script scraping the phonebook from Facebook.
Step 4: Once all the Phonebook entries have been imported, you will see an option to download the the contents as a CSV file. The full CSV file contains the following details:
Name,City,State,Phone #,Network / Other Info,Contact Result,Notes / Next Step,Who Calls,Month to call back,Year,Who’s List
We have tested and found that this script works without any problems, however, this might not be valid according to Facebook TOS. The export process is pretty fast and you might consider using this if you have a large number of contacts whose phone numbers you want to export and use externally.
There is a slight problem with the URL which is tracked by the script and the problem that the shortcut which does not work, because of which it will not work out of the box in Google Chrome [6]. However, you can modify the line below to change the dto something else as the shortcut key.
GM_registerMenuCommand("Export Facebook Phonebook", doExport, "d", "control shift","f");Ratings: 2.5/5 (Good)
Article printed from Techie Buzz: http://techie-buzz.com
URL to article: http://techie-buzz.com/how-to/export-facebook-phonebook-as-csv-file.html
URLs in this post:
[1] Facebook: http://techie-buzz.com/tag/facebook
[2] Greasemonkey: http://techie-buzz.com/tag/greasemonkey
[3] Greasemonkey add-on: https://addons.mozilla.org/en-US/firefox/addon/748
[4] Export Facebook Phonebook Userscript: http://userscripts.org/scripts/show/64231
[5] this URL: http://www.facebook.com/friends/#/friends/?filter=pfp
[6] Google Chrome: http://techie-buzz.com/tag/google-chrome
Click here to print.
Copyright © 2006-20011 Techie Buzz. All rights reserved.