我正在尝试获取链接的 Facebook 喜欢总数。将链接粘贴到浏览器中以查看 xml 响应
这是我正在做的事情:
var link = "https://api.facebook.com/method/fql.query?query=select%20%20like_count,%20total_count,%20share_count,%20click_count%20from%20link_stat%20where%20url=%22http://micgadget.com/29723/the-undercover-report-on-how-the-new-iphone-5-is-made-inside-foxconn-factory/%22";
//var xml = MakeRequest(link);
XDocument xdoc = XDocument.Load(link);
var likes = (from e in xdoc.Descendants("total_count")
select e).SingleOrDefault().Value;
return int.Parse(likes);
它在 linq 查询中抛出一个对象引用查询。如何从响应中获取 toal_count?
谢谢