I'm creating a Windows 8 Metro App to fetch Facebook contacts. In a normal windows application created in Windows 7 accepts WebClient
,
private WebClient wc = new WebClient();
string jsonResponse = wc.DownloadString("https://graph.facebook.com/" + ID);
FacebookUser User = JsonConvert.DeserializeObject<FacebookUser>(jsonResponse);
but this does not work in my Windows 8 Metro App
So, I started using HTTPRequest
and HTTPResponse
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
I don't know how to get the response (list of Facebook contacts) as a JSON.
Can anyone help me please?