hi all,
I have developed a web application which helps to reterive persons name, picture, profile_url from facebook. To get the information from facebook i have added two dll named called "facebook.dll" and facebook.Linq.dll". I have added "application key" and "secret key also". After I developed , the application was able to get information from facebook.
Suddenly, when i try to get information from facebook i got the error that says "the underlying connection was closed." i got the application key and secret key from the internet to connect with facebook.
Here is my code,
protected new void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { facebook.Components.FacebookService fbService = new facebook.Components.FacebookService(); fbService.ApplicationKey = "bfeefa69afdfe81975f0d6136ace3009"; fbService.Secret = "9b672d682e1d8befd06382953fc2615b";
// here i got empty string value, but before i got some values in xml format. string strXMLOutput = fbService.fql.query("SELECT name, pic_square, profile_url FROM user WHERE name = 'Suresh'");
TextReader reader = new StringReader(strXMLOutput);
DataSet ds = new DataSet();
ds.ReadXml(reader);
if (ds != null && ds.Tables.Count > 1 && ds.Tables[1].Rows.Count >0)
{
Session["Datasource"] = ds.Tables[1];
dataGridResults.DataSource = ds.Tables[1];
dataGridResults.DataBind();
dataGridResults.DataMember = "user";
}
}
}
How to resolve it?
thanks r.e