我试图通过此查询获取 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 *一个对象?可以使用对象的成员来订购查询吗?
答案 0 :(得分:2)
只需使用ORDER BY like_info。不要忘记放置LIMIT,否则查询可能会因大量图片而崩溃:
SELECT like_info, object_id FROM photo WHERE aid="20531316728_324257" ORDER BY like_info desc LIMIT 10