0

我在一个类中使用 facebook sdk api 来返回一个公共的 facebook 页面帖子。但它返回空白,它不会引发错误。

var client = new FacebookClient();
dynamic result = client.Get("oauth/access_token", new
                 {
                     client_id = facebook_AppID, //App Id
                     client_secret = facebook_AppSecret, //App Secret
                     grant_type = "client_credentials" //client_credentials
                 });
var AccessToken = result.access_token;
var facebookClient = new FacebookClient(AccessToken);
JsonObject pagePost = facebookClient.Get("/thepagename/posts") as JsonObject;
string html = "";
foreach (var account in (JsonArray)pagePost["data"])
{
   html += (string)(((JsonObject)account)["message"]);
}

我错过了什么?

4

0 回答 0