【问题标题】:FQL Query for getting Chat conversation获取聊天对话的 FQL 查询
【发布时间】:2012-08-19 03:16:14
【问题描述】:

这里是代码。结果我想看到我的对话和我朋友的对话。对于对话历史记录功能我该怎么做?

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 = 'xxxxxxxxxxxxxxx' ORDER BY created_time DESC LIMIT 0,25

此代码仅返回我的朋友数据。

【问题讨论】:

    标签: facebook chat history facebook-fql


    【解决方案1】:

    您已将返回的 cmets 限制为仅由您的朋友创作。

    改变

    AND author_id = FRIEND_ID
    

    AND (author_id = FRIEND_ID OR author_id = me())
    

    在查询的 `WHERE 子句中。

    【讨论】:

    • 这个答案会获取 author_id 是你的消息,即你曾经发送过的任何消息
    【解决方案2】:

    使用您的原始查询获取 thread_id,然后尝试此 fql 查询。我认为 thread_id 属于整个对话

    SELECT message_id, thread_id,source,author_id,body,created_time,viewer_id FROM
    message WHERE thread_id=THREAD_id AND (author_id=FRIEND_ID OR 
    author_id=me() )  ORDER BY created_time DESC LIMIT 0,25
    

    【讨论】:

      猜你喜欢
      • 2021-06-05
      • 1970-01-01
      • 1970-01-01
      • 2011-05-18
      • 2016-08-17
      • 1970-01-01
      • 2023-03-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多