开发者

Facebook Oauth2.0

开发者 https://www.devze.com 2023-02-24 06:41 出处:网络
I am connecting my website to faceboo开发者_如何学Pythonk using Facebook Graph API. public string WebResponseGet(HttpWebRequest webRequest)

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

精彩评论

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