FQL查询:如何选择来自同一国家的用户

发布于 2024-12-23 18:37:43 字数 111 浏览 2 评论 0原文

如何编写 FQL 查询来选择来自同一国家/地区的用户?

由于 home_location 不可索引,因此我们不能使用 home_location 作为索引。

那么,该怎么做呢?

How do I write the FQL query to select users from the same country?

As hometown_location is not indexable, we cannot use hometown_location as the index.

So, how to do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月依秋水 2024-12-30 18:37:43

您可以(如果您查询的用户数量不是过多)只需获取所有用户的 hometown_location 属性,然后自行过滤即可。

You could (if it wasn't an excessive number of users that you were querying) just get all of them with their hometown_location attribute and then filter it yourself.

心安伴我暖 2024-12-30 18:37:43

如果您已经注意到 FQL 不允许您使用该列进行比较,那么您将需要将您正在查看的每个用户信息加载到代码中的某个数组中。然后循环遍历该数组来比较 home_location。

If you've already noticed that FQL won't let you compare using that column, then you will need to load each of the user's info you are looking at comparing into some array in your code. Then loop thru that array comparing the hometown_location.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文