I would like to retrieve all messages from https://graph.facebook.com/me/inbox or via FQL for specific user like: "All messages from and to user with ID: 123456789"
I will be possible with FQL multi-query ?
var fbid = your_fbuid_here;
FB.api({
method: 'fql.query',
query: 'SELECT thread_id, author_id, created_time FROM message WHERE thread_id IN (SELECT thread_id FROM thread WHERE folder_id = 0) AND author_id = ' + fbid + ' ORDER BY created_time ASC LIMIT 1'
}, function ( threadresponse ) {
FB.api({
method: 'fql.query',
query: 'SELECT thread_id, body, author_id, created_time FROM message WHERE thread_id = ' + threadresponse[0].thread_id + ' ORDER BY created_time ASC'
}, function ( inboxresponse ) {
//do stuff here with results
});
});
facebookfacebook-fqlfacebook-apifacebook-graph-apifacebook-fql-query
I will be possible with FQL multi-query ?
Yes it is possible when the inbox belongs to an authenticated app user with the appropriate permissions granted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With