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

我想从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
                });
            });

facebookfacebook-fqlfacebook-apifacebook-图的apifacebook-FQL查询


我将可以使用FQL多重查询吗?

是的当收件箱属于经过身份验证的应用程序用户且授予相应的权限时可以。

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

上一篇: How to get messages for specific user by FQL or GRAPH API?

下一篇: append xml file using xmlwriter