facebook-csharp-sdk / facebook-winclient-sdk

Facebook SDK for Windows & Windows Phone
http://facebooksdk.net
Apache License 2.0
61 stars 139 forks source link

No connectivity exception (moved from facebook-csharp-sdk) #49

Open sanjeevdwivedi opened 10 years ago

sanjeevdwivedi commented 10 years ago

https://github.com/facebook-csharp-sdk/facebook-csharp-sdk/issues/280

The SDK seems to raise an exception if there is no internet connectivity. In the tutorial we are instructed to create an instance of FacebookSessionClient straight away in the app.xaml.cs without checking connectivity. So when I test on an winphone8 emulator, the following exception is raised several seconds after startup:

{Facebook.WebExceptionWrapper: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) at System.Net.Browser.ClientHttpWebRequest.<>cDisplayClasse.bd(Object sendState) at System.Net.Browser.AsyncHelper.<>cDisplayClass1.b0(Object sendState) --- End of inner exception stack trace --- at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at Facebook.OpenReadCompletedEventArgs.get_Result() at Facebook.Client.FacebookSessionClient.b0(Object o, OpenReadCompletedEventArgs e) at Facebook.HttpHelper.OnOpenReadCompleted(OpenReadCompletedEventArgs args) at Facebook.HttpHelper.ResponseCallback(IAsyncResult asyncResult, Object userToken) at Facebook.HttpHelper.<>cDisplayClass2.b0(IAsyncResult ar) at System.Net.Browser.ClientHttpWebRequest.<>cDisplayClass1d.b__1b(Object state2)}

//cc @RamsayGit