0
你好我在opengraph工作了一段時間,但有一些東西,不斷擾亂我。Facebook的API獲取提要
我不能得到每個人的消息在飼料
"data": [
{
"id": "984656456_1111111",
"from": {
"name": "Xxx Some Name",
"id": "478975485"
},
"message": "test",
"picture": "https://somepictureSomewhere.jpg",
"link": "https://www.facebook.com/photo.php?fbid=10151943257604861&set=p.101519&type=1&relevant_count=1",
"icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yz/r/StEh3RhPvjk.gif",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/589884/posts/10151943984861"
}
],
"privacy": {
"value": ""
},
"type": "photo",
"status_type": "added_photos",
"object_id": "1015194324861",
"created_time": "2013-10-24T12:54:43+0000",
"updated_time": "2013-10-24T12:54:43+0000"
}
],
"paging": {
"previous": "https://graph.facebook.com/58980/feed?limit=25&since=1382619283",
"next": "https://graph.facebook.com/58988/feed?limit=25&until=1382619282"
}
}
這是我的代碼, 我得到以下錯誤:RuntimeBinder例外是與usersFeeds.message [I] 雖然UsersFeeds.data unhandeled [i] .from.name工作正常。
FacebookClient fb = new FacebookClient(access_token);
dynamic UsersFeeds = fb.Get("/me/posts");
int teller = (int)Usersfriends.data.Count;
for (int i = 0; i < 10; i++)
{
lstUsersFriends.Items.Add(UsersFeeds.data[i].from.name);
lstUsersFriends.Items.Add(UsersFeeds.message[i]);
}