Question

Facebook graph API allows to retrieve chat messages using "GET /me/outbox". Is there any way to retrieve the messages sent to/from a friend using graph API modifiers rather than parsing the entire array of messages.

Was it helpful?

Solution

Using fql, just change the FRIEND_USER_ID:

SELECT author_id, body, created_time FROM message WHERE thread_id IN (SELECT thread_id FROM thread WHERE folder_id = 1 AND 'FRIEND_USER_ID' IN (recipients))

You can test with graph API explorer.

OTHER TIPS

As long as you have the thread_id, or the facebook thread id, then yes. Use /me/inbox or /me/outbox and select a specific id graph.facebook.com/messageid

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top