Thursday, April 19, 2012

DataContract class for Facebook 'Like' Graph API

So I'm trying to decode the json returned by the Facebook Graph API for user likes into objects using the DataContractJsonSerializer. I've tried creating a couple different [DataContract] classes now but with no luck.



What is the correct way to create a [DataContract] class for this data.



{
"data": [
{
"name": "Earlyups",
"category": "Recreation/sports",
"id": "170410902986097",
"created_time": "2012-04-09T03:34:11+0000"
},
{
"name": "pictureline inc.",
"category": "Local business",
"id": "28861182380",
"created_time": "2012-03-28T02:02:24+0000"
},
{
"name": "Jackson Hole Mountain Resort",
"category": "Sports/recreation/activities",
"id": "24718308041",
"created_time": "2012-03-20T16:10:45+0000"
}
],
"paging": {
"next": "next_page_request_url"
}
}




No comments:

Post a Comment