如何使用 FQL 多查询
获取我 friend 的个人资料图片创建日期?
我写了下面的查询:
SELECT src_small, src_big, src FROM photo WHERE src IN
(SELECT pic_square, pic_small, pic_big, pic FROM user WHERE uid IN
(SELECT uid2 FROM friend WHERE uid1 = me()) )
但是它说:
{
"error": {
"message": "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 ",
"type": "NoIndexFunctionException",
"code": 604
}
}
提前致谢。
最佳答案
from comment by Arjuna Del Toso:
You can use a column in the WHERE clause only if it's marked as "indexable"
不,那并不完全正确。
您的 where 子句中需要至少一个可索引的列——一旦有了,您还可以使用其他非索引列来进一步限制结果。
由于用户当前的个人资料图片始终是其个人资料图片 专辑的专辑封面照片,我们可以使用它来获取object_id
我们 friend 的头像,然后用它从 photo
表中选择我们想要的信息:
SELECT owner, src_small, created FROM photo WHERE object_id IN (
SELECT cover_object_id FROM album WHERE owner IN (
SELECT uid1 FROM friend WHERE uid2 = me()
) AND name = 'Profile Pictures'
)
关于iphone - 从 FQL 中的用户表获取个人资料图片创建日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12192247/