1

我正在尝试使用以下查询获取按FQL中的类似计数排序的Facebook相册的照片:

SELECT like_info, object_id FROM photo WHERE aid="xxxxxxxxxx_xxxx" ORDER BY like_info.like_count desc

但我得到一个错误(#602) like_count is not a member of the like_info scalar.

SELECT like_info, object_id FROM photo WHERE aid="xxxxxxxxxx_xxxx" ORDER BY like_info desc

有诀窍,但我不知道为什么:*like_info* 不是一个对象吗?可以使用对象的成员对查询进行排序吗?

4

1 回答 1

2

只需使用 ORDER BY like_info。不要忘记设置 LIMIT,否则查询可能会因大量图片而崩溃:

SELECT like_info, object_id FROM photo WHERE aid="20531316728_324257" ORDER BY like_info desc LIMIT 10

在 Facebook API 资源管理器中运行

于 2012-10-20T04:06:54.487 回答