Note that there are some explanatory texts on larger screens.

plurals
  1. POOAuthException Facebook C# SDK ie9
    text
    copied!<p>I am using the following code in my facebook application. The when loading the application in facebook has no problem in chrome/firefox/ie8. When it runs in IE9 it is reporting that OAuthException has been thrown.</p> <pre><code>public string GetFacebookId() { if (!FacebookWebContext.Current.IsAuthorized()) return string.Empty; var client = new FacebookWebClient(); dynamic me = client.Get("me"); return me.id; } </code></pre> <pre><code>(OAuthException) An active access token must be used to query information about the current user.</code></pre> <p>any suggestions would be appreciated.</p> <p>thanks.</p> <p><strong>EDIT:</strong></p> <pre><code>window.fbAsyncInit = function () { FB.init({ appId: '@(Facebook.FacebookApplication.Current.AppId)', // App ID //channelURL: '//facebook.thefarmdigital.com.au/moccona/premium/FacebookChannel/', // Channel File status: true, // check login status cookie: true, // enable cookies to allow the server to access the session oauth: true, // enable OAuth 2.0 xfbml: true // parse XFBML }); FB.Canvas.setAutoGrow(); }; $(function () { $('#custom_login').click(function () { FB.getLoginStatus(function (response) { if (response.authResponse) { //should never get here as controller will pass to logged in page } else { FB.login(function (response) { if (response.authResponse) { window.location = '@(Request.Url.AbsoluteUri.Replace(Request.Url.PathAndQuery, ""))' + $('#custom_login').attr('href'); } else { window.location = '@(Request.Url.AbsoluteUri.Replace(Request.Url.PathAndQuery, ""))' + $('#custom_login').attr('dataFail'); } }, { scope: 'publish_stream' }); } }); return false; }); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload