I'm trying to parse the following Json string
{
{
"data": [
{
"uid": 100001648098091,
"first_name": "Payal",
"last_name": "Sinha",
"sex": "female",
"pic_big_with_logo": "https://m.ak.fbcdn.net/external.ak/safe_image.php?d=AQAi8VLrTMB-UUEs&bust=1&url=https%3A%2F%2Fscontent-a.xx.fbcdn.net%2Fhprofile-ash2%2Fv%2Ft1.0-1%2Fs200x200%2F10018_433988026666130_85247169_n.jpg%3Foh%3Dc2774db94dff4dc9f393070c9715ef65%26oe%3D552CF366&logo&v=5&w=200&h=150",
"username": "payal.sinha.505"
}
]
}
}
I've tried following code
var fb = new FacebookClient(accessToken);
dynamic result = fb.Get("fql",
new { q = "SELECT uid, first_name, last_name, sex, pic_big_with_logo, username FROM user WHERE uid=me()" });
dynamic dynamicJsonResult = JObject.Parse(result);
var userDetail = JsonConvert.DeserializeObject<List<FacebookUserDetailAPIResponseWrapper>>(dynamicJsonResult.data);
class
public class FacebookUserDetails
{
public string username { get; set; }
//Password = EncryptionClass.Md5Hash(Guid.NewGuid().ToString()),
public string first_name { get; set; }
public string last_name { get; set; }
public string sex { get; set; }
public string pic_big_with_log { get; set; }
}
I'm not sure what I'm doing wrong But the same approach i use to parse every json string.
Thanking you in advance.