有没有办法在Facebook上获取消息线程的ID

有没有办法在Facebook上获取消息线程的ID

本文介绍了有没有办法在Facebook上获取消息线程的ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我从用户的消息中获取了facebook线程的URL,那么有没有办法获取该线程的ID?我得到如何构造一个给定id的URL,但不是其他方式。



该URL可以有两种格式:



https://www.facebook.com/messages/123456789

https:// www.facebook.com/messages/<username>



我需要能够处理这两种情况。



谢谢。

解决方案
  SELECT thread_fbid 
FROM unified_thread
WHERE single_recipient =< USER ID>

文件:



这正是你想要的。问题是:

 (#298)您必须是应用程序的开发人员

请阅读






所以,一个实际的解决方法将循环所有线程从 graph.facebook.com/me/inbox?fields=to ,只要你没有找到一个: p>


  • 只有2位参与者(因为某些主题是群组对话,您不想要),

  • 包含由用户ID /用户名代表的人员。



使用您最喜爱的语言手动完成。


If I have the URL of a facebook thread from a user's messages, is there a way to get the id of that thread? I get how to construct a url given an id, but not the other way around.

The URL can have two formats:

https://www.facebook.com/messages/123456789orhttps://www.facebook.com/messages/<username>

I need to be able to handle both cases.

Thanks.

解决方案
SELECT thread_fbid
  FROM unified_thread
 WHERE single_recipient = <USER ID>

Doc: https://developers.facebook.com/docs/reference/fql/unified_thread

This gives exactly what you want. The problem is:

(#298) You must be a developer of the application

Please read unified_thread still not open for public?


So, one actual workaround would be to loop on all the threads from graph.facebook.com/me/inbox?fields=to as long as you didn't find one which:

  • has only 2 participants (because some threads are group conversations and you don't want them),
  • and contains the participant who is the person represented by a user ID/username.

This has to be done manually, using your favorite language.

这篇关于有没有办法在Facebook上获取消息线程的ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 05:26