Which SDK to use for Asp.Net with Facebook
I am working on a Facebook canvas flash app and my server is in Asp.Net 2.0. I checked the facebook developer wiki and it seems like there are different Asp.Net SDKs available. Please suggest me which is the best one.
You can call Facebook api function through url in code behind like this
string url = "https://graph.facebook.com/" + userId + "/friends?access_token=" +oAuthToken; string results = string.Empty; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); StreamReader sr = new StreamReader(resp.GetResponseStream()); results = sr.ReadToEnd(); sr.Close();
"result" will be in the form of Json object, you can parse it to get the data. Above example will get you details of friends of the specified "userid" with "access_token".
If your application is in Flash, then it doesn't matter that your server supports ASP.NET. You'll need to use a Flash or ActionScript SDK instead. Try http://code.google.com/p/facebook-actionscript-api/.