我正在尝试使用REST API从fb中获取朋友列表。在C#中的REST API
ArrayObject的填充有:
- SecretKey的
- API_KEY方法= “facebook.friends.get”
- CALL_ID UID
- V = 1.0
- SIG = MD5码
我试图拨打电话:
public string GetResponse(ArrayObject Parameters)
{
// Set the encoding type
theRequest.ContentType = "application/x-www-form-urlencoded";
theRequest.ContentLength = Parameters.getData().Length;
// We write the parameters into the request
StreamWriter sw = new StreamWriter(theRequest.GetRequestStream());
sw.Write(Parameters.getData());
sw.Flush();
sw.Close();
// Execute the query
theResponse = (HttpWebResponse)theRequest.GetResponse();
StreamReader sr = new StreamReader(theResponse.GetResponseStream());
return sr.ReadToEnd();
}
但我来到这里的异常:
theResponse = (HttpWebResponse) theRequest.GetResponse();
与消息:
The remote server returned an error: (500) Internal Server Error.
同样的问题:/ – 2010-02-26 23:07:49