Facebook uses many algorithms to display search results, such as relevance indicators, user search complexity, and product .
One of the algorithms for displaying results on their page is as shown below.
Personal context:
Unlike most search engines, every Facebook search includes two key elements - query and query.
Just as we need to understand a request, it must be understood by the person behind the request.
People are more likely to look for things located in their own city / country or for people who have the same college / workplace.
We review this information and much more when ranking the results. The more we learn about you, the better your search results will be.
In the Graph API, they do not use this algorithm. They simply display the requested result. Therefore, you cannot achieve the same result using the graph search API.
For this you can use the following apporach -
- Get user friend list using me / friends? limit = 1 & offset = 1
- Get list of users using api search
- combine both results
- show result to user
For more information (approach / algorithm) you can check Introduction to Facebook Search
source share