Facebook Graph API search places by category

后端 未结 1 647
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 20:39

I\'m currently developing an Android app that uses Facebook graph API to get pages/places based on user\'s location. I also want to filter the results by category, like restaura

1条回答
  •  名媛妹妹
    2021-02-04 21:21

    There should be, but I can't unravel how.

    This FQL query will get you information about all places near a known location:

    SELECT name, page_id, categories, description, general_info 
       FROM page WHERE page_id IN 
         (SELECT page_id FROM place WHERE 
            distance(latitude, longitude, "37.76", "-122.427") < 1000
          )
    

    The categories field is an array with the values id and name. Looking at these results, there are a series of category names like "Restaurant": "Italian Restaurant", "Bar/Restaurant, etc.

    What I can't find is a way to add a WHERE categories clause to this that returns data.

    0 讨论(0)
提交回复
热议问题