与特定用户的对话

时间:2014-04-24 12:30:35

标签: ios facebook-graph-api facebook-fql fql.multiquery

如何使用带有fql查询或多查询的用户的uid从我的收件箱中获取特定用户的对话? 例如:如果我想要用户X与uid = 786758454和我之间进行对话?

类似这样的事情

SELECT message_id, thread_id, author_id, body, created_time, viewer_id 
FROM message WHERE thread_id IN 
(SELECT thread_id, subject, recipients FROM thread WHERE folder_id =0 )
AND author_id = 'user X uid' ORDER BY created_time DESC LIMIT 0,25

1 个答案:

答案 0 :(得分:0)

您需要两个用户ID。用户X uid和你的uid。尝试使用这个fql查询:

SELECT message_id, thread_id, author_id, body, created_time, viewer_id FROM message WHERE thread_id IN (SELECT thread_id FROM thread WHERE folder_id = 0) and (author_id = 'user X uid' or author_id = 'YOUR user uid') ORDER BY created_time DESC

希望这可以解决您的问题。