5

I am working in facebook Application MVC 4 c# SDK 6

is there any way to get the list of all Facebook User. Either friend or not, who lives in California using Facebook Query Language

StanK
  • 4,750
  • 2
  • 22
  • 46
Pankaj
  • 9,749
  • 32
  • 139
  • 283
  • Like @JSuar said, it's not possible to query/search for all the people living in California, beacuse the User's location is a permission-restricted field. – Tobi Jan 27 '14 at 09:06

2 Answers2

3

List of your friends who live in California and have it list in their current location.

SELECT name, current_location
FROM User 
WHERE uid IN (SELECT uid2 FROM Friend WHERE uid1 = me())  
      AND current_location.state = "California"

Test out the query here.

I don't think it's possible to pull this information on all Facebook users since the location column is not indexed. This answer does a good job explaining why searching by location along is not possible.

Helpful links:

Community
  • 1
  • 1
JSuar
  • 21,056
  • 4
  • 39
  • 83
0

The one word answer is No. But you can get access to users that have made their location public.

see similar question Facebook API: can I get detailed info about user's location?

Community
  • 1
  • 1
GreatJobBob
  • 271
  • 1
  • 8