且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何获取用户的帖子

更新时间:2023-02-12 19:27:39

由于数据是数组,因此您无法访问from.name。

You cannot access from.name as you showed because the data is an array.

可以试试这个。

var fb = new FacebookApp("access_token");
dynamic result = fb.Get("/me/feed");

foreach (dynamic post in result.data)
{
    var fromName = post.from.name;
    Console.WriteLine(fromName);
}