I'm trying to query the thread FQL table to get all unread messages, and also the count of unread items in the thread.
This is how I query the table:
SELECT thread_id,updated_time,snippet,snippet_author,unread FROM thread WHERE folder_id=0 AND unread!=0
From reading the doc to which I linked above, it seems to me that unread should include the count of unread messages in the thread.
However, I just tested the above call and Facebook gives me back a value of unread=1, despite the thread in question having 4 unread items.
This is how the thread looks on facebook.com (notice the (4), showing that unread should be 4):
This is what the API returns to me, which is wrong (notice the "unread":1):
{
"data":[
{
"name":"messages",
"fql_result_set":[
{
"thread_id":"BLAH BLAH BLAH",
"updated_time":1333317140,
"snippet":"BLAH BLAH BLAH",
"snippet_author":BLAH,
"unread":1
}
]
}
]
}
Am I doing something wrong, or is this a bug?