1

我写了一个 FQL 查询来获取标记我的朋友的名字 -

这是 FQL 查询,它为我提供了朋友 ID 的列表(有效):

SELECT owner FROM photo WHERE object_id IN (SELECT object_id FROM photo_tag WHERE subject=me())

现在我想通过查询来获取他们的名字:

SELECT name FROM user WHERE uid IN (SELECT owner FROM photo WHERE object_id IN (SELECT object_id FROM photo_tag WHERE subject=me()))

但我没有得到完整的名称列表,它停止并给出了这个错误 - “未捕获的类型错误:无法读取未定义的属性‘名称’”

4

1 回答 1

0

您的查询可能会失败,因为owner您的内部查询返回的某些 id 不属于用户。profile改用表格试试:

SELECT name FROM profile WHERE id IN 
  (SELECT owner FROM photo WHERE object_id IN 
    (SELECT object_id FROM photo_tag WHERE subject=me()))
于 2013-02-13T19:26:16.510 回答