It is no longer possible to export your Facebook friends to Twitter or Google+ in the way it once was by using Yahoo mail- http://lifehacker.com/5824769/how-to-migrate-all-your-facebook-data-to-google%252B
Yahoo now (presumably forced by Facebook) tag all imported Facebook friends so you can’t then export them.
I am wanting to find a way of converting Yahoo contacts to a CSV file including Facebook contacts, and thought the best way would be converting the simple print view (see https://dl.dropbox.com/u/95261/CloudShot/shot_21062012_153052.png ) to a CSV file.
Ideally I’d use a Bookmarklet and thought I could use a plugin similar to Table2CSV-
http://www.kunalbabre.com/projects/table2CSV.php
I created the following bookmarklet as a test:
javascript:;var s=document.createElement('script'); s.setAttribute('src','http://jquery.com/src/jquery-latest.js'); document.getElementsByTagName('body')[0].appendChild(s); s.setAttribute('type', 'text/javascript'); var t=document.createElement('script'); t.setAttribute('src','http://www.kunalbabre.com/projects/table2CSV.js'); document.getElementsByTagName('body')[0].appendChild(t); t.setAttribute('type', 'text/javascript'); $('qprintable').table2CSV();
This doesn’t work because the table in Yahoo print contacts puts each contact in a separate table. I’ve got a sample here (I’ve changed the details to protect the privacy!)- http://pastebin.com/STuKmwQa
Ideally I’d be able to either download as a CSV or copy and paste. I’d like to use a bookmarklet as I want this to be easy for the end user and hope this will benefit all the people that currently can’t export their Facebook contacts easily.
How do I achieve this?
http://jsfiddle.net/GMmdg/5/
general selector format:
concrete selector for jsfiddle, but it probably won’t work with actual page:
Data extractor function, change internal selectors if necessary:
Untested, freshly written function to create csv, enjoy the options:
updated, full js http://marijnhaverbeke.nl/uglifyjs/):
http://pastebin.com/vCuVBUvE