Retrieve user's messages from facebook account
I trying to retrive user's messages using fql query, I have this code
string fqlOutput = MainForm.stFacebookService.Api.Fql.Query("SELECT
author_id,thread_id,body FROM message WHERE thread_id in (SELECT thread_id FROM
thread WHERE folder_id = 0)");
XDocument xml = XDocument.Parse(fqlOutput);
XNamespace fbns = XNamespace.Get("http://api.facebook.com/1.0/");
var feed = from fql_feed in xml.Root.Elements(fbns + "stream_post")
select new
{
AuthorID = fql_feed.Element(fbns + "author_id").Value,
开发者_运维知识库 Body = fql_feed.Element(fbns +"body").Value
};
the result set of feed varianble is empty, but I have messages on my inbox folder, what I'm doing wrong??
Make sure you've granted the read_mailbox extended permission to your app.
精彩评论