我想从 https://graph.facebook.com/me/inbox 或通过 FQL 为特定用户检索所有消息,例如:“来自和发送给 ID 为 123456789 的用户的所有消息”
我可以使用 FQL 多查询吗?
最佳答案
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
});
});
facebook facebook-fql facebook-api facebook-graph-api facebook-fql-query
关于facebook-graph-api - 如何通过 FQL 或 GRAPH API 获取特定用户的消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9185951/