i am trying to access the facebook user information(education, hometown details) using graph api Is it possible to do this string url = "https://graph.facebook.com/me?fields=id,name,picture,bio,quotes,education,hometown&access_token=" + oAuth.Token;
string json = oAuth.WebRequest(oAuthFacebook.Method.GET, url, String.Empty);
UserInfo ui = js.Deserialize<UserInfo>(json);
StringBuilder sb = new StringBuilder();
sb = sb.Append("Name : " + ui.name + "<br/>");
sb = sb.Append("<Img src='" + ui.picture + "' alt='' />");
sb = sb.Append("Bio : " + ui.bio + "<br/>");
sb = sb.Append("Quotes : " + ui.quotes + "<br/>");
//This does not work sb = sb.Append("hometown : " + ui.hometown[0] + "<br/>");
//This does not work sb = sb.Append("Education : " + ui.education[0] + "<br/>");
I the following UserInfo class
public class UserInfo
{
public string id { get; set; }
public string name { get; set; }
public string picture { get; set; }
public string bio { get; set; }
public string quotes { get; set; }
public HometownInfo from { get; set; }
}
public class HometownInfo
{
public string id { get; set; }
public string name { get; set; }
}
Please give me some inputs.. I dont have a lot of experience in .net. Also, I understand that ui.hometown[0] is not the correct way to access the user Hometown info... Please correct me Thanks SC