如何通过Graph Api按文件夹查询对话? [英] How to query conversations by folder via Graph Api?

查看:64
本文介绍了如何通过Graph Api按文件夹查询对话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的组织最近开始在其Facebook页面上使用文件夹.然后,可以将对话分为收件箱",未读",跟进",完成"和垃圾邮件".

My organisation recently started using folders on their Facebook page. The conversations then can be categorized as Inbox, Unread, Follow Up, Done and Spam.

我定期通过Graph API下载消息,当所有对话都保留在收件箱"中时,一切运行正常.但是,最近他们对对话进行了分类,因此收件箱中目前只有7个元素,未读和跟进"中有0个元素,完成"和垃圾邮件"文件夹中有无数个元素.

I regularly download the messages via Graph API and everything worked fine when they kept all the conversations in the Inbox. However recently they categorized the conversations, so the inbox has only 7 elements at the moment, 0 elements in the Unread and Follow Up and countless elements in the Done and Spam folders.

我之前使用以下查询:

me/conversations?fields=updated_time,messages.limit(100){message,from,created_time}&limit=100

现在,它仅返回收件箱中的元素.

Now it only returns the elements from the inbox.

图形API参考含糊地描述了文件夹和标签之类的参数.我尝试使用文件夹参数,例如:

The Graph API reference vaguely describes parameters like folder and tags. I tried to use the folder parameter like:

me/conversations?folder=done
me/conversations?folder=unread
me/conversations?folder=randomstring

一直以来,收件箱中都返回了相同的7个元素.

It all the time returned the same 7 elements from the inbox.

但是,如果我查询me/conversations?folder=spam,它将返回10个不同的元素,该元素与实际的垃圾邮件"文件夹不重叠,并且包含标记为完成"的元素. (它们是非常令人讨厌的对话,因此它们可能被标记为垃圾邮件,并且可能有两种不同的定义,即将垃圾邮件标记为垃圾邮件或位于垃圾邮件文件夹中.)

However, if I query me/conversations?folder=spam it returns 10 different elements, which does not overlap with the actual "Spam" folder and contains elements marked as "Done". (They are quite fishy conversations, so they might have been marked as spam and there might be two different definitions of being spam as marked as spam or being in the spam folder, I don't know.)

API参考未指定如何实际使用文件夹和标签参数,也没有说明如何查询其他文件夹中的消息.

The API reference does not specify how to actually use the folder and the tags parameter and does not say anything how to query messages in the other folders.

您知道如何访问其他文件夹中的对话吗?我可以一一查询文件夹,也可以从所有文件夹查询.

Any idea how to access the conversations in the other folders? It's fine for me to query the folders one-by-one or to query from all folders as well.

推荐答案

文档可能需要进行一些更新.但是现在,我可以通过以下方式查询完成"中的消息:

The documentation might need some updating. But for now, I can query messages in "DONE" via:

/{page-id}/conversations?tags=action:archived

这篇关于如何通过Graph Api按文件夹查询对话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆