title: SL4 Facebook application no longer retrieves access_token
body: <p>I have an SL4 Out of Browser application which has been working for several months. As of right now, it appears it will not longer retrieve an access_token from Facebook. I am using facebook-c#-sdk v4.1.1. Some partial code is posted below:</p>
  
  <pre><code>    void FacebookLoginBrowser_Loaded(object sender, RoutedEventArgs e)
      {
          if (!loggedIn)
          {
              LoginToFacebook();
          }
      }
  
      private void LoginToFacebook()
      {
  
          dynamic parms = new System.Dynamic.ExpandoObject();
          parms.display = "popup";
          parms.client_id = appId;
          parms.redirect_uri = successUrl;
          parms.cancel_url = failedUrl;
          parms.scope = requestedFbPermissions;
          parms.type = "user_agent";
  
          loggingInUri = fbApp.GetLoginUrl(parms);
  
          FacebookLoginBrowser.Source = (loggingInUri);
  
      }
  </code></pre>
  
  <p>Below is the code for the html page the browser is redirected to:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      Complete
  &lt;/body&gt;
  &lt;script type="text/javascript"&gt;
      window.external.notify(window.location.href);
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The javascript then fires the following:</p>
  
  <pre><code>    private void FacebookLoginBrowser_ScriptNotify(object sender, NotifyEventArgs e)
      {
  
          if (e.Value != "Failed")
          {
              string url = e.Value.Replace('#', '?');
  
              url = HttpUtility.UrlDecode(url);
  
              Uri ur = new Uri(url);
  
              string[] str = ur.Query.Split('&amp;');
              access_token =  str[0].Split('=')[1];
  
              if(!String.IsNullOrEmpty(access_token)){
                  fbApp = new FacebookApp(access_token);
  
                  App app = (App)Application.Current;
                  app.Fuid.fbApp = fbApp;
  
                  loggedIn = true;
                  loginSucceeded(e);
              }
  
          }
  
          if (fbApp.Session == null)
          {
  
              failedLogin();
          }
      }
  </code></pre>
  
  <p>It appears the querystring which normally contains the access_token value is not longer there. Using Fiddler, I was able to see the redirect from facebook which does contain the access_token value. I am not sure where it is being lost at. Let me know if any one needs any additional information. Thanks!</p>