title: Facebook API - Invalid signed request. (Invalid signature.)
body: <p>I'm tryng to use Facebook authentication at <a href="http://landlordscores.co.uk/account/login.aspx" rel="nofollow">http://landlordscores.co.uk/account/login.aspx</a> but after logging in with facebook, the callback page displays "Invalid signed request. (Invalid signature.) ". The app ID and secret are correct and no other information seems to be logged. This happens every time I try to log in with facebook.</p>
  
  <p><strong>Edit:</strong>
  To make the call, I'm using pretty much the exact code as the sample.
  In the markup:</p>
  
  <pre><code>&lt;iframe src="&lt;%= this.RegistrationUrl %&gt;"
                          scrolling="auto"
                          frameborder="no"
                          style="border:none"
                          allowTransparency="true"
                          width="100%"
                          height="500"&gt;
                    &lt;/iframe&gt;
  </code></pre>
  
  <p>In the code-behind:</p>
  
  <pre><code>public string RegistrationUrl {
      get
          {
      var url = string.Format(
      "http://www.facebook.com/plugins/registration.php?client_id={0}&amp;redirect_uri={1}&amp;fields={2}",
      FacebookApplication.Current.AppId,
      HttpUtility.UrlEncode(AppBLL.GetAbsoluteURL("~/Account/fbregcallback.aspx")),
      HttpUtility.UrlEncode("[{\"name\":\"name\"},{\"name\":\"email\"},{\"name\":\"location\"},{\"name\":\"password\",\"view\":\"not_prefilled\"},{\"name\":\"captcha\"}]"));            this.RegisterUser.ContinueDestinationPageUrl = this.Request.QueryString["ReturnUrl"];
      this.hdnPassLength.Value = Membership.MinRequiredPasswordLength.ToString();
                              HttpUtility.UrlEncode("[{\"name\":\"name\"},{\"name\":\"email\"},{\"name\":\"location\"},{\"name\":\"password\",\"view\":\"not_prefilled\"},{\"name\":\"captcha\"}]"));       
      this.hdnPassLength.Value = Membership.MinRequiredPasswordLength.ToString();
      }
  }
  </code></pre>