How can I fetch page conversations with unread messages only using either Graph API or FQL ?
I did not found any table reference for that in FQL and in Graph API I can't figure out if I can filter unread messages only
How can I fetch page conversations with unread messages only using either Graph API or FQL ?
I did not found any table reference for that in FQL and in Graph API I can't figure out if I can filter unread messages only
I did it this way.
SELECT sender, body FROM unified_message
WHERE thread_id IN
(SELECT thread_id FROM unified_thread WHERE folder = 'inbox' AND unread=1)
AND unread=1
ORDER BY timestamp DESC
for more information: How to get unread messages using FQL?
From the documentation:
The unread
parameter is not indexed, and thus cannot be searched. You'll havta get all the messages, and filter them yourself.
this is the fql for view unread conversation:
SELECT message_id, author_id, body, created_time, viewer_id, thread_id FROM message WHERE thread_id IN (SELECT thread_id FROM thread WHERE folder_id = 0 and unread != 0)