facebook-csharp-sdk/facebook-csharp-sdk — Issue #96: KeyNotFoundException during facebook connect
Author: bjw2176
Created: 2012-02-25 06:45:06+00:00
State: open

I get the following error trying to call ExchangeCodeForAccessTokenAsync when the user has "Secured Browsing" enabled in their facebook settings. Can someone tell me what I need to be doing differently? It works fine with this is disabled.

I have tried using both "https://www.facebook.com/connect/login_success.html" and "http://www.facebook.com/connect/login_success.html" as the return uri. Using 5.4.1 of the sdk.

" at System.ThrowHelper.ThrowKeyNotFoundException()\r\n at System.Collections.Generic.Dictionary`2.get_Item(String key)\r\n at Facebook.JsonObject.get_Item(String key)\r\n at Facebook.FacebookOAuthClient.BuildExchangeCodeForAccessTokenResult(String json)\r\n at Facebook.FacebookOAuthClient.b__6(String json)\r\n at Facebook.FacebookOAuthClient.<>c__DisplayClass9.b__8(Object o, OpenReadCompletedEventArgs e)\r\n at FluentHttp.HttpHelper.OnOpenReadCompleted(OpenReadCompletedEventArgs args)\r\n at FluentHttp.HttpHelper.ResponseCallback(IAsyncResult asyncResult, Object userToken)\r\n at FluentHttp.HttpHelper.OpenReadAsync(Object userToken)\r\n at FluentHttp.HttpHelper.OpenReadAsync()\r\n at Facebook.FacebookOAuthClient.<>c__DisplayClass9.b__8(Object o, OpenReadCompletedEventArgs e)\r\n at FluentHttp.HttpHelper.OnOpenReadCompleted(OpenReadCompletedEventArgs args)\r\n at FluentHttp.HttpHelper.ResponseCallback(IAsyncResult
asyncResult, Object userToken)\r\n at FluentHttp.HttpHelper.<>c__DisplayClass2.b__0(IAsyncResult ar)\r\n at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClassa.b__8(Object state2)\r\n at System.Threading.ThreadPool.WorkItem.WaitCallback_Context(Object state)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadPool.WorkItem.doWork(Object o)\r\n at System.Threading.Timer.ring()\r\n"