skip to Main Content

I’m trying to find people either from particular city or who live in that city. Is there an API for this purpose?

When I use Facebook page, I can type in “People who live in Rome, Italy” (which is translated to URL https://www.facebook.com/search/115353315143936/residents/present) and it shows me all people who currently live in Rome. Using web page I can also search people by name and then add additional filter by city.

Can I do something similar with Graph API?

2

Answers


  1. You can only search by name with the API: https://developers.facebook.com/docs/graph-api/using-graph-api#search – there is no way to get the same kind of search than on facebook.com.

    Login or Signup to reply.
  2. you can add center and distance in the query
    this comes from the documentation, you can change the type to type=user

    GET graph.facebook.com
      /search?
        q=coffee&
        type=place&
        center=37.76,-122.427&
        distance=1000
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search