Facebook has become a part of our life and it is the primary medium that connects us to our friends. One common request or feature that is needed for most of us is to export friends list (just the names) from Facebook.
There are two ways to do it (that I know) and I have covered both of them here.
Export Friends List from Facebook using Archival Option
There is an option to back up your entire Facebook account, zip it and get it downloaded. The backup also includes your friends list which makes our work easier.
- Login into your Facebook account and navigate to https://www.facebook.com/settings
- Click on the Download a copy link.
- It may take some time to archive your Facebook account and you will get an email once it’s available for download.
- Extract the zip file and open the index.htm file.
- Now click on the Friends link to get the list of your Facebook friends.
The above method will take some time and also includes other details that you don’t need. Let’s see how to quickly export friends list from Facebook using the developer tools.
Export Friends List from Facebook using Developer Tools
Facebook developer tools help programmers a lot, but why let them have all the fun? Let’s give it a shot, it’s pretty simple.
- Login into your Facebook account and navigate to https://developers.facebook.com/tools/.
- Click on Graph Explorer.
- By default you should see your id and name as shown below.
- Click on the + symbol from the left pane which will bring you a drop down with categories fields and connections.
- Head to the connections category and select friends and click on Submit button to refresh the result.
- You should get a message as shown below:
“message”: “An access token is required to request this resource.”,
- The above error message says that you need to generate an access token.
- Click on the Get Access Token button.
- You should see a dialog box that gives you three tabs:
User Data Permissions – This is all about your data.
Friends Data Permissions – This is about your friends data.
Extended Permissions – This is about Ad’s management, reading Insights etc.
- By default you should be on User Data Permissions tab, select the user_friends checkbox and click Get Access Token button.
- Graph API will request for permission to access your public profile and friends list. Click Okay.
- An Access Token will be generated, now again click on Submit button to refresh the result.
- You should now see your friends list populated and displayed in JSON format.
You can use the JSON Viewer Plugin in Notepad++ to format and view the JSON in a more graphical way.
- Just copy the result into a text file and save it.
- Open Notepad++ and add JSON Viewer Plugin.
- Load the text file that has your friends list in JSON format.
- Select the entire content of the file (CTRL + A) and navigate to Plugins menu, JSON Viewer and click Format JSON (CTRL + ALT + SHIFT + M) then click on Show JSON Viewer (CTRL + ALT + SHIFT + J).
- You should now see a visual tree on your left as shown below. Each Object represents each of your friend’s data.
The downside in both of the above approach is you won’t be able to get your friends email list unless they had allowed the same under Email section in General Account Settings.
Got a better way to export friends list from Facebook? Let us know.