开发者

Retrieve user's messages from facebook account

开发者 https://www.devze.com 2022-12-29 04:31 出处:网络
I trying to retrive user\'s messages using fql query, I have this code string fqlOutput = MainForm.stFacebookService.Api.Fql.Query(\"SELECT

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消