我需要接收给定范围内的 Facebook 地点列表(由 NE 和 WS 坐标定义)
我从 javascript 应用程序调用以下 fql.query:
FB.api({
method: "fql.query",
query: "SELECT name,description,geometry,latitude,longitude,checkin_count,display_subtext FROM place WHERE latitude < '" + bounds.getNorthEast().lat() + "' and longitude < '" + bounds.getNorthEast().lng() + "' and latitude > '" + bounds.getSouthWest().lat() + "' and longitude > '" + bounds.getSouthWest().lng() +"'"
},
function(response) {
///
}
但是我收到错误 604
Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql
据我所知,place
表中唯一的索引列 http://developers.facebook.com/docs/reference/fql/place/是page_id
。但我看不出有什么办法可以从其他表中获取这个 page_id
。
是否有任何(也许更简单)的方法可以在给定范围内接收 Facebook 位置?
最佳答案
您说得对,FQL 表无法使用,因为这些列未建立索引。
但您可以尝试使用图形 API 调用来搜索特定位置内的地点。
例如 - https://graph.facebook.com/search?type=place¢er=37.76,-122.427&distance=1000&access_token= ...
这来自此处的 Graph API 文档 - https://developers.facebook.com/docs/reference/api/
关于javascript - 如何获取范围内的 Facebook 地点列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12167258/