I am familiar with the Facebook API. Take a look at http://developers.facebook.com . First, you need to request the user access to your friends list. After that, you can request an open graph to get a list of friends. Take a look at the permissions documentation to learn how to request permissions and what permissions you need to request.
You can create a cache and save it locally. However, this data will be changed. If you create cache on your own system, make sure that it is regularly invalid and updated. I retrieve the data every time I need it and cache it for immediate use only.
source share