facebook - fql OR 并按 desc 和偏移量排序

标签 facebook facebook-fql

我对 Facebook 的 fql 请求有一些疑问:)。

当我这样请求时

SELECT uid, profile_url FROM user where contains('potatoe') OR uid in(select id from profile where contains ('potatoe')) ORDER BY mutual_friend_count desc LIMIT 0,2

即使我改变偏移量,我总是得到相同的结果......

但是

  • 如果我将 DESC 更改为 ASC,则“偏移”有效...
  • 如果我将 OR 更改为 AND 并让 desc 排序=>“偏移”也起作用!

我的 OR/desc/offset 组合有问题吗? 或者我只是误解了“或”运算符? :/

非常感谢。

最佳答案

您应该这样编写 FQL 查询:

SELECT uid, profile_url FROM user

where uid in(select uid from user where contains ('potatoe') )

OR uid in( select id from profile where contains ('potatoe') )

按mutual_friend_count描述排序

限制 0,2

FQL 无法在 bool 表达式中解释“contains”的结果,因此您的 OR 运算符在这里失败...

关于facebook - fql OR 并按 desc 和偏移量排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15545259/

相关文章:

mysql - 存储 facebook 好友 - 超时 - mysql 数据库

ios - 使用 Facebook Graph API 获取最近的雇主

facebook - 检查用户是否喜欢 Facebook Canvas 应用程序

php - Graph API/FQL 不返回页面的所有事件

javascript - 在 "Warning: setState(...): Can only update a mounted or mounting component."函数中设置状态时出现 "FB.Event.subscribe()"错误

ios - 只获取那些没有过期的 Facebook 事件 graph api

ios - 尝试在转换过程中开始模态转换

php - 连接 Facebook 按钮 - 弹出窗口如何工作?

javascript - 我可以在 Facebook 中拥有多少个 javascript 链接?

java - com.google.gson.JsonSyntaxException : java. lang.IllegalStateException:应为 BEGIN_ARRAY 但为 STRING