facebook graph api返回空白数据

时间:2013-09-03 15:19:57

标签: facebook facebook-graph-api facebook-sdk-3.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"]);
}

我错过了什么?

0 个答案:

没有答案