- Login to facebook.
- Go to http://www.facebook.com/friends/edit/?sk=phonebook&offset=0 (or, if you're looking to get contacts 100-199, etc, change the "offset=" term).
- Press ctrl+a, ctrl+c to grab your info.
- Open up your favorite text editor and paste (ctrl+v) into a blank file. Save this file as "raw_phones.txt".
- Download "fb_phone_to_csv.py"[Dropbox]. Save it into the same directory as "raw_phones.txt". Run it (you'll need python.).
- You ought to see a new file in the directory, "phone_numbers.csv". This contains your phone's information, formatted in a Google CSV.
- Login to Gmail.
- On the left, click Contacts.
- Click "More Actions">"Import"
- Select "phone_numbers.csv" (created above) and hit import!
- Once this is done, click "More Actions">"Find & merge duplicates". Check the duplicates it finds and accept what you want to.
- Done! Your facebook phone numbers are all integrated. You can go to "More Actions">"Export" to move your Gmail contacts elsewhere if you want to.
Boring legal stuff, etc:
I'm releasing the .py file above under an MIT Software Licence. You are free to make derivative works, ports, or apps (and even sell them). I do appreciate credit though, and I ask that you seriously consider releasing any derivatives for free.
If you have improvements you'd like me to incorporate, feel free to comment with a Dropbox link (or similar). I'll patch it if your code looks useful and give you credit.