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:
{
“error”: {
“message”: “An access token is required to request this resource.”,
“type”: “OAuthException”,
“code”: 104
}
}
- 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.
Hello Sri
The results I get using the developer tool are empty.
I think it has something to do with the new changes in api V.2.
do you have any comments on this?
Hello Camilo, apologize for replying late (very late, i know) i did face issue but it was different, instead of empty results i just got 4 friends listed in the result area. If you still haven’t found a way, you can switch the API version back to v1.0 in the drop-down that is available on the top. Clear your existing access token, generate a new one and try again. It just worked fine and i was able to see the complete list. Do let me know if it works for you. Have a great day.
Hi Sri.
Thanks for your reply.
Your solution works now, but it will stop working in 2015. The V1.0 of the Graph Api will no longer be available by then and all apps and companies using this info, will go extinct…
I have created an online petition to ask facebook to reconsider this decision. Sign it and spread the word
https://www.change.org/en-AU/petitions/facebook-platform-team-allow-developers-to-access-the-list-of-friends-from-users-of-their-apps
Hi Camilo, Let us hope that they include this feature in V2.0, btw signed the online petition. Have a good day.
Thank you for you reply, Sri. I’ll check out your link. Your site is helpful.
Sri,
Thank you for sharing the second option (using developer tools) to export friends list. Do you know whether we could use this second option to also export just our private messages?
Hi Jerra, glad to hear that this was useful to you. Yes, it is possible to export your private messages using developer tools, see the detailed article on how to do that here. Thanks for your wonderful question,have a good day.