Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I get the Facebook identifiers of all of my Facebook friends? I mean the numbers like 7843652532 or 93923423.

(I am using these IDs to associate with my address book.)

share|improve this question
Do you mean all of the ID's of your Facebook friends? What format do you want the ID's in - a list, JSON etc? – codingbadger Feb 2 '11 at 11:57
@Barry: Yes :-) Any format would be OK, for instance list or JSON. – nic Feb 2 '11 at 12:10

You get this is JSON format by going to http://developers.facebook.com/docs/reference/api

About the 4th paragraph you need to click the link next to "Friends" (which is https://graph.facebook.com/me/friends) however the link on the page includes an Authorization token which is require to run the query.

Facebook Friends Link

This will give a JSON result of all friends names and Facebook ID's

share|improve this answer
Impressive! Not need to write a request or authorize an application or anything :-) – nic Feb 2 '11 at 12:49
up vote 0 down vote accepted

Since December 2014 it is a bit complex:

  • Install the FB Purity extension
  • Load the Facebook homepage
  • Find your ~/.config/chromium/Default/Local Storage/chrome-extension_ncdlagniojmheiklojdcpdaeepochckl_0.localstorage file. (exact name might vary, search for ncdlagniojmheiklojdcpdaeepochckl in your filesystem)
  • Open this file with SQLitebrowser
  • Select the data ItemTable>oldfriendstore-<something>
  • It is the list of ID,name couples as JSON

PRE-2014/12 method

Barry's answer has worked great in the past, but that link is not available anymore. New solution: Go to https://developers.facebook.com/tools/explorer/?method=GET&path=me/friends select V1.0 and press Submit. You get the whole list of ID+name couples.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.