My organisation recently started using folders on their Facebook page. The conversations then can be categorized as Inbox, Unread, Follow Up, Done and Spam.
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.
I used the following query before:
me/conversations?fields=updated_time,messages.limit(100){message,from,created_time}&limit=100
Now it only returns the elements from the inbox.
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
It all the time returned the same 7 elements from the inbox.
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.)
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.
While this is called the Graph API, it is actually a REST API.
The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.
The documentation might need some updating. But for now, I can query messages in "DONE" via:
/{page-id}/conversations?tags=action:archived
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With