当我从 Facebook Realtime API(webhooks)收到“消息收到回调”事件时,我想获取对话中的先前消息。为此,我需要对话线程的 ID。
https://developers.facebook.com/docs/messenger-platform/webhook-reference/message?locale=en_US
该事件不包含有关对话线程 ID (t_id) 的任何信息。它只包含消息 ID (mid)。
https://developers.facebook.com/docs/graph-api/reference/v2.8/conversation
有没有办法获取 session 线程 ID?
最佳答案
我觉得有一种更简单的方法可以做到这一点。您可以在对话中使用 user_id 过滤器:
https://graph.facebook.com/v3.0/--PAGE-ID--/conversations?fields=senders&user_id=
从这里查看参数部分:https://developers.facebook.com/docs/graph-api/reference/page/conversations/
关于Facebook - 使用消息 ID 获取对话线程 ID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42995306/