How to get messages for specific user by FQL or GRAPH API?

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-图的apifacebook-FQL查询


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.

链接地址: http://www.djcxy.com/p/57364.html

上一篇: GPS位置抖动消除的算法/理论

下一篇: 如何通过FQL或GRAPH API为特定用户获取消息?