我的目标是创建一个FQL查询来检索我的所有朋友流帖子的全名和完全返回的电子邮件。所以我创建了一个FQL多重查询(如下所示),但我一直得到空结果(试图把它放在Graph API Explorer中):
"query1":"SELECT actor_id, message FROM stream
WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid = me())
AND actor_id IN (SELECT uid2 FROM friend WHERE uid1 = me())"
"query2":"SELECT uid, name FROM user WHERE uid IN (SELECT actor_id FROM #query1)"
任何人都知道我该如何正确地做到这一点?
多重查询是否完全适用于Graph API Explorer?
答案 0 :(得分:4)
您需要将查询作为JSON对象提供,您缺少对象表示法({...}
)和查询之间的逗号。
这有效:
{"query1": "SELECT actor_id, message FROM stream WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid = me()) AND actor_id IN (SELECT uid2 FROM friend WHERE uid1 = me())",
"query2":"SELECT uid, name FROM user WHERE uid IN (SELECT actor_id FROM #query1)"}