facebookmessagefacebook-fql

Graph API me/threads returns a weird Thread ID


I'm having a weird problem and I'm not sure if it's a bug in my code or a bug in the way I'm using the Facebook APIs.

I've been playing around with the Facebook Graph API lately and I'm now beginning to write an app that grabs the logged in user's messages. I make a call to the endpoint /me/threads and that returns successfully, but the IDs don't appear to be properly formatted. An example of one that I get from the Graph API is "t_/qZVQQhfJDgfEhGEPzF41Q". The equivelent FQL query is returning the same thread to have an ID of "1200043279354", which is more like I would have expected.

This issue became evident to me when I tried to run an FQL query to fetch "SELECT ... FROM message WHERE thread_id = t_/qZVQQhfJDgfEhGEPzF41Q". It came back complaining that "t_ is not a member of the message table." I tried getting rid of the "t_" and it complained that "/qZVQQhfJDgfEhGEPzF41Q" doesn't exist. The same FQL query for "...thread_id = 1200043279354" returns what I want.

Any ideas on what could be going on? Is it just not possible to switch between the Graph API and FQL like I am doing?


Solution

  • I searched a bit but can't tell what this endpoint (/me/threads) is all about, I did find this error report though: New Messaging APIs (/me/threads) return invalid characters in Thread/Message IDs.

    The docs for the User graph api object talk about the inbox connection and not threads, and indeed if you try to get /me/inbox you'll get a list of the messages and the right id for each one (if you have the read_mailbox permission), you are welcome to try: