我的代码在这里遇到了问题,现在我在谷歌上搜索了大约 3 个小时。
我只是在做一个 FQL 查询,我正在尝试读取结果。但不幸的是。我不知道怎么做。
var fbclient = new FacebookClient(accessToken);
dynamic result = (IDictionary<string, object>)fbclient.Get("fql", new
{
q = new[]
{
"SELECT name FROM user WHERE uid = me()",
"SELECT unread_count FROM mailbox_folder WHERE folder_id = 4 AND viewer_id = me()",
"SELECT is_unread FROM notification WHERE recipient_id = me()",
"SELECT unread FROM friend_request WHERE uid_to = me()"
}
});
string name = "";
foreach (dynamic data in result.data)
{
name = data.name;
}
最后一部分 ( foreach
) 不起作用 - 只是我尝试的最后一件事。