Search code examples
facebookfacebook-graph-apifacebook-fql

FB Graph API explorer, center params not working


I am trying to get all parties list in Bangalore using graph API. I am using following graph query

search?q=parties&type=event&center=12.9716,77.5946&distance=10000

in facebook graph explorer

https://developers.facebook.com/tools/explorer/145634995501895

Though I am giving Bangalore lat and long, I am getting results from different cities

for example first result I am getting is from Barcelona

 "city": "Barcelona",
 "country": "Spain",
 "latitude": 41.384918007029,
 "longitude": 2.1618401413727,
 "street": "Gran Via de Les Corts Catalanes 571",
 "zip": "08011"

enter image description here


Solution

  • If you read https://developers.facebook.com/docs/graph-api/using-graph-api#search carefully, you’ll notice that these parameters are listed for the search type place only.

    You can not use these parameters when searching for events. Passing them anyway achieves nothing, they are simply ignored.

    The most you can do, is include Bangalore in your search term, to only search for events that have that city name included in their title.