我正在嘗試使用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