开发者

Facebook Oauth2.0

I am connecting my website to faceboo开发者_如何学Pythonk using Facebook Graph API.

 public string WebResponseGet(HttpWebRequest webRequest)
        {
            StreamReader responseReader = null;
            string responseData = "";

            try
            {
                responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream());
                responseData = responseReader.ReadToEnd();
            }
            catch
            {
                throw;
            }
            finally
            {
                webRequest.GetResponse().GetResponseStream().Close();
                responseReader.Close();
                responseReader = null;
            }

It gives me an excption Webexception unhandled by user The remote server returned an error

Any tips on this? I dont have a lot of programming experience but given this task.. so pls pardon me if its a question which I should be aware of

Thanks SC


Look at the Response property of the WebException you are thrown. That will contain a message from Facebook which (hopefully) explains the issue

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜