Hi All,
I was successfully in retrieving the token provided by gmail.However I am not able to get the user info details like first name,lastname etc.
Please Help Me
Here is the code snipet
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(sreq);
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
Stream responseBody = res.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader readStream = new StreamReader(responseBody, encode);
string loginStuff = readStream.ReadToEnd();
string SID = loginStuff.Substring(0, loginStuff.IndexOf("LSID")).Replace("SID=", "").TrimEnd('\n');
string LSID = loginStuff.Substring(loginStuff.IndexOf("LSID"), (loginStuff.IndexOf("Auth") - loginStuff.IndexOf("LSID"))).Replace("LSID=", "").TrimEnd('\n');
Token= loginStuff.Substring(loginStuff.IndexOf("Auth")).Replace("Auth=", "").TrimEnd('\n');
After this I call a method to get user info
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Newrl);
req.Method = "GET";
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
Stream responseBody = res.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
How ever I get error at the Bold line...please help me