Facebook API returning wrong unread thread count
Posted
by
houbysoft
on Stack Overflow
See other posts from Stack Overflow
or by houbysoft
Published on 2012-04-01T22:20:57Z
Indexed on
2012/04/02
17:29 UTC
Read the original article
Hit count: 279
facebook-fql
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?
© Stack Overflow or respective owner