addCategory()
有8个高级类别:
Param categories[0] must be one of {EDUCATION, FOOD_BEVERAGE, HOTEL_LODGING, MEDICAL_HEALTH, ARTS_ENTERTAINMENT, SHOPPING_RETAIL, FITNESS_RECREATION, TRAVEL_TRANSPORTATION}
但是我需要一个Web API(不是Android)。我尝试了以下Web API:
https://graph.facebook.com/search?distance=1000¢er=-37.756180,145.151895&type=place&fields=id,名称,类别列表,location & limit = 20& access_token = ****
返回以下内容:
but I'm not sure how I can filter these results based on their category. For example, I don't want to return suburbs. I want to return certain types of places such as restaurants, banks etc. However adding &category=133576170041936
(that's the ID for the BANK category) won't filter the results.
Adding &category=FOOD_BEVERAGE
also does nothing.
Is there another way to filter the results based on category.?
You can't search for pages using the search API - it has been deprecated.
See: https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes/
And: https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4
Search API
Deprecated: Support for finding pages, groups, events, users using search.
但是,我相信您可以使用categories
(不是您所拥有的类别)参数搜索地点。例如
https://graph.facebook.com/search?categories=["FOOD_BEVERAGE"]...
我也相信(可能是错误的)您可以提供多个类别,例如
https://graph.facebook.com/search?categories=["FOOD_BEVERAGE", "HOTEL_LODGING"]...
这就是list type
在JSON语法中指定的相似类别,例如:["firstitem", "seconditem", "thirditem"]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句