Facebook Graph Event 查询无地址

Facebook Graph Event query no address

我刚刚读到这个:

https://developers.facebook.com/docs/graph-api/reference/v2.3/event

似乎没有关于事件发生地点的数据。只有 "Page" 属性又具有 contact_address 值。现在我的问题是:那些不属于某个地方的事件怎么办?他们在 FB 中也有地址,但似乎无法从 FB 图 API 中获取此数据。还是我错过了什么?有人知道获取这些数据的解决方法吗?

我们想分析一堆事件并将它们全部放在地图上。但如果我们无法获得活动的地址,那将不起作用..

Graph API 的 V2.3 之后,location/place 信息更加一致。您可以在此处阅读更多相关信息:

https://developers.facebook.com/docs/apps/changelog#v2_3_changes:

Consistent Place Data - Content objects tagged with a place now share a consistent place data structure which contains the ID, name the location of the place. This includes Events, Photos, Videos, Statuses and Albums. As a result, the venue and location fields have been removed from the Event node. Developers should access the place field instead.

这确实意味着只有使用页面作为位置的事件才有位置。您应该关注 'Place' 字段,它会为您提供一个页面。

如果您可以访问 API 的 V2.2 版本,您仍然可以改用 'location' 字段。这将 return 您在活动中定义的地址。