After Google introduced its own rival social network Google+, many of us wanted to import our Facebook friends to Google so that we can invite our Facebook friends to Google+ to have them and add them to circles. Since then, as Google plus was the direct competitor to Facebook, Facebook made it harder to get your friends to Google+ in bulk. Eventually they also blocked developer API to get access to friend list along with Email addresses even they are visible to you. Right after, Google also blocked Facebook from being able to export Google contacts to Facebook, and said to Facebook authority that, they won’t allow it unless Facebook does reciprocity. Though other than contacts, Facebook is allowing to sync Facebook birthdays and events with google calendar and other services.

Import Facebook Contacts

Then folks made an easy workaround where, you first import your Facebook friend contacts to Yahoo and then export yahoo contacts to CSV file or directly to Google. Because Facebook is allowing yahoo users to export contacts. Though this trick was working for a while, Yahoo then started to prevent exporting contacts that are taken from Facebook ( they have collaboration with Facebook). Also, Yahoo doesn’t allow importing Facebook contacts neither to Twitter or LinkedIn. Even though you will find an option to import yahoo contacts in Gmail, Facebook imported yahoo contacts will never be imported to Google nor in CSV file.

Then the folks on web have been rushing here and there to find a way to do that and hopefully there’s still an easy way to accomplish this. Just because Yahoo lets you export Facebook contacts and just because Yahoo lets you print them all! Here we will use two key methods – Yahoo’s print contacts feature and a simple JavaScript. Don’t get worried if you aren’t an expert. Because the JavaScript is ready-made and all you have to do is just follow my guide. I have presented all this visually that is actually ‘noob proof‘. Please don’t be in hurry. Follow my all steps to avoid any error or problem.

Requirements

  • An Yahoo Account.
  • Google Chrome (JavaScript is enabled by default, you shouldn’t disable it).
  • A simple text editor like notepad.
  • An automated JavaScript that provided here.
  • No technical knowledge (I presented all things in screenshot).

How to Export Facebook Friends/Contacts to CSV File

1. First, we need to import all Facebook contacts to our yahoo account. Log-in to mail.yahoo.com (if you are not going to use these contacts for Yahoo purpose, it’s better to create a new yahoo account to keep freshness everywhere). Click on Contacts icon from the top left-hand side.

Click contacts in Yahoo Mail

2. In the contacts page, click Import Contacts button.

Click "Import Contacts"

3. Then click on Import under Facebook label.

Click import under Facebook label

4. You will be presented a window where it may ask you for Facebook authentication. Proceed and it will start to import all contacts of your Facebook friends to your Yahoo mail account.

Import Progress

5. Soon after, the prompted window will show that “*** contacts successfully imported from Facebook” or like that. So now you have finished first step – all of your Facebook contacts are now possessed by your Yahoo account. Give Yahoo one or two minutes to let you view the contacts as it may take a while to present imported contacts.

Import success message

6. Now go back to Contacts page in Yahoo mail and click on Facebook tab from left-hand side. Choose all contacts and click Print All under Actions drop-down menu.

Print Yahoo contacts

7. Choose Basic view under layout and hit Print.

Choose Basic view

8. You should be presented with a prompted print-view in new tab (you must be using Chrome as I tested it in Chrome). Click Cancel to bring normal address book page.

Cancel print window

9. Now that we have the normal print view page of the address-book. Now we need to save this as contacts.html file and reload it to chrome. To do that, go ahead.

Address book page

10. While in this page, press F12 from your keyboard (or alternatively use Chrome’s inspect element from right-mouse-click menu). It will bring the sour code view.

Press F12 to bring source code view

11. Now we need to copy the whole source code. To do that, click on the first arrow of the code right before <html>.  It should collapse the code in one line.

Click arrow beside <html>

12. Right-click on the line and choose Edit as HTML.

Edit as HTML

13. Now select all by pressing Ctrl+A and copy the whole HTML code from the field.

Copy whole HTML from field

14. Now on your desktop (or in any place on your hard drive) create a new text document (Mac and Linux users do it using your OS way).

Create new text document

15. Paste the copied code in this text file.

Paste html source code in text document

16. Now from toolbar, click File then Save As.

Use save as

17. In Save As windows, its important to make all things as I did. Choose All Files (*.*) under Save as type, change the file extension from .txt to .html, Choose Unicode in encoding type. The click save. You can save it as contacts.html file for easier recognition.

Change things properly in save as window

18. Now we need to save a JavaScript code as bookmark in chrome browser. This JavaScript will be used to retrieve contacts from our saved contacts.html file and store them to a csv file so we can import it to Google or else other. For your information, the first JavaScript file I found, was authored by IAGDOTME (http://pastebin.com/H8ZDDdU6) which is no more working. Later many others (http://goo.gl/qndkem) corrected and forked many scripts. I have tested many scripts and the only script that is working for me right now is written by Ron whom I found as a commenter at iag.me, as the earlier script mentioned by iag.me is no more working.

So now, head to http://pastebin.com/zkYm6n06 (thanks to Ron) and copy the code.

Copy the JavaScript of Yahoo to CSV

 

19. Now, to properly save the JS code in chrome bookmark, go to a new tab and click on the star icon in Chrome’s address bar. The click Edit.

Add to Chrome bookmark

20. In the  Bookmarklet editor, give it a name (I have given the name “Yahoo to CSV“), in URL section (most important part), remove any previous link and paste the JavaScript code you copied from pastebin. Select the folder “Bookmark Bar” for easier access later. Then click save.

Save JavaScript in Chrome bookmark URL

20. Now go to desktop or the location on hard-drive where you saved contacts.html. Open the file contacts.html using chrome.

Open contacts.html using Chrome

22. It should open the page normally as previous print-view(with the file location mentioning in address-bar).

Open contacts.html in Chrome

23. Now while in this page, click on the bookmark “Yahoo to CSV“. At this time, the JavaScript will execute.

Click the JavaScript bookmark while in contacts.html page

24. Right after you should see a field containing all contacts that was in contacts.html. Now press Ctrl+A using your keyboard, copy all these.

Copy contacts using Ctrl+A

Note (Update): If you are not getting any output after clicking on the JavaScript on Chrome, Try Firefox. On Firefox, you won’t have to do the steps from 10-22. Here’s output on Firefox:

Export Yahoo contacts on Firefox

Firefox troubleshooting: If still you don’t get output on Firefox, try reloading the print page or include the steps from 10 -22 for Firefox too.

25. Now on your hard-drive/desktop create a new text document and then paste them in the new text document. The go to File then Save as.

Use Save as again

26. In save as window, do as I did. Choose Encoding: Unicode, Save as type: All files (*.*), Change the file extension from txt to csv. Then click save.

Save the text file as csv

27. Hurrah! You have done exporting your Facebook friends/contacts to csv file (backup of contacts). Here’s my imported contacts of Facebook friends.

My exported contacts

Now you can use this CSV file to import Facebook contacts anywhere you wish including Google+, Gmail etc.

Note: These contacts only contain name and email addresses. Don’t expect to have phone numbers here.

How to import Facebook contacts to Google, Gmail, Google+, Twitter, LinkedIn, etc

Note: If you are able to import these contacts to Google, you can import them to all other social networks using their “Import from Gmail” feature. Or it can be done with the CSV file.

1. First we need to import the contacts to Google. To do that, navigate to google.com/contacts. Then click Import under More drop-down menu.

Import in Google

2. In import contacts window, click on Choose File. Then choose the contacts.csv file that you imported from Yahoo. Then click Import button.

Import contacts csv file to Google

3. Right after, within a few seconds you will be able to see newly imported contacts in a label named Imported with date at left-hand side under My contacts.

Access newly inported Facebook contacts in Google

4. Hurrah! You have done all steps about importing Facebook friends to Google. Having contacts in Google contacts also means that you can also have them in Gmail and Google plus.

5. To invite these imported friends to Google+ and add them to circles, head to plus.google.com/people/contacts. You can also send them email my typing their name in Gmail’s to: address bar. This also helps you sync Facebook contacts on Android phone using Google account without Facebook app.

6. To follow Facebook friends in Twitter, head to twitter.com/who_to_follow/import and click Find Friends under Gmail category.

7. To Connect Facebook friends in LinkedIn, head to linkedin.com/fetch/importAndInviteEntry, choose Gmail and enter your Gmail address and then click Continue.

Note: This doesn’t sync Facebook contacts with Google, Google+ or any other. To keep it in sync, you need to repeat the process.

So now you can import both Facebook friends birthdays and email address to Google.

There is another method of Exporting Yahoo contacts to csv file using python made by Joincamp. This method is a lot harder compared to this process.

You should have done with what you have been looking for. Sorry to make the post very lengthy. I wanted to make sure every type of readers can do it smoothly without any confusion. So I used too much visually to make every step clear.

I have taken a lot of time to prepare and craft this post. So do let me know if it worked for you. Also let others know it by sharing the post if possible. If you have any other problem regarding this, post your comment.

Author: 

Jaber is a Programmer and Tech Enthusiast Geek from Dhaka, Bangladesh. He is the founder and Chief-Editor of TechGainer. While he is away from his keyboard, either he's fishing or messing with wildlife. In case, you can contact him at rijans[at]techgainer[dot]com.