How to get a Facebook friends list

Table of Content
Intro

Friends' information is one of the most requested types of data. It owes such highly growing popularity to its vital use in various applications. Also, information about friends is widely used for visualizing social connections, monitoring opinions, and much more.

Unfortunately, the official Facebook friends API limited the function of getting friends' data in 2014 (starting from version 2.0), and in 2018 (starting from version 3.2), completely removed it. But many different programs could help you get a friends list in various ways, including getting a friends list by private Facebook APIs available on the market. You can easily Google them if you want. But we should pay attention to some principal features when choosing among them, namely: the number of friends you can take with a single request, the type of friends list response, and the last but not least – the price for a subscription or tariff plan.

But when it comes to reliable tools, it is Data365 API you can use as an efficient solution. In this article, we will provide you with algorithms on how to get a friend list from Facebook and their posts with our API, supplementing them with detailed examples.

Apply Data365 Facebook API and get a friends list

Through Facebook API from Data365, you can get a profile friends list. For easy reference, we have created an algorithm for how to do it.

1

First, you need to send a POST query to search and download tweets to our database:

COPY

https://api.data365.co/v1.1/twitter/search/post/update?keywords=covid&from_date=2020-01-01&to_date=2021-01-01&search_type=latest&max_posts=100&access_token={TOKEN}
2

Then send a GET request to find out if we have updated the information about the profile you are interested in our database:

COPY

https://api.data365.co/v1.1/facebook/profile/igor.bondar.3323/update?access_token=TOKEN

Do not worry; it usually takes 3-15 minutes.

3

When the status of your request is "finished", send a GET request to get a list of friends of the profile you are interested in:

COPY

https://api.data365.co/v1.1/facebook/profile/igor.bondar.3323/friends/profiles?access_token=TOKEN

You can find a sample JSON response of the friends' list here.

We kindly advise you to draw your attention to such important details. First of all, through our API Facebook, you can get a friends list only for those profiles whose lists of friends are publicly available, and secondly, you can obtain only a part of your friends, not all. The Facebook web version does not allow you to physically get all your friends if there are a lot of them.

How to use Data365 Facebook API to get friends' posts

You can also receive a list of profile posts through our API.

1

To do it, you should send a POST request with the ID of the profile, the list of posts that you would like to receive:

COPY

https://api.data365.co/v1.1/facebook/profile/Jokowi/update?load_feed_posts=1&max_posts=100&access_token=TOKEN
2

Then submit a GET request to see if we have updated the information about the profile in our database:

COPY

https://api.data365.co/v1.1/facebook/profile/Jokowi/update?access_token=TOKEN
3

When the status of your request is "finished", send a GET request to get a list of posts of the profile you are interested in:

COPY

https://api.data365.co/v1.1/facebook/profile/Jokowi/feed/posts?max_page_size=100&access_token=TOKEN

You can find an example of a JSON response posts list here.

Summaries

Facebook is one of the most powerful social networks today, with about 2 billion average daily active users. And all of them are a source of interesting information and data. You can use friends' info for a variety of purposes, from using it in various applications to visualizing social connections, monitoring opinions, etc. To get a list of friends effectively, you need a handy toolkit. Among all the options, the most reliable and user-friendly is Facebook from Data365. Try to obtain lists of friends and posts on your side and make sure of it!