title: facebook C# SDK iframe canvas app in 3.5
body: <p>I'm trying using facebook c# sdk 4.0 using framework 3.5 for a Iframe Canvas App, i've achieved so far to authorize the app with extended permissions, but i'm not sure if I'm following the right way, as all i've done is through mix match of different answers here. Following is my code so far</p>
  
  <p>Parent Class</p>
  
  <pre><code>protected string requiredAppPermissions = "email,publish_stream";
  
  public MyMaster()
  {
      fbApp = new FacebookApp();
  
      authorizer = new CanvasAuthorizer(fbApp);
      authorizer.Perms = requiredAppPermissions;
  }
  
  protected FacebookApp fbApp;
  protected CanvasAuthorizer authorizer;
  
  public void CanvasRedirect(string url)
  {
      Contract.Requires(url != null);
  
      var content = CanvasUrlBuilder.GetCanvasRedirectHtml(url);
  
      Response.ContentType = "text/html";
      Response.Write(content);
  }
  </code></pre>
  
  <p>Inherited Page</p>
  
  <pre><code>protected override void PageLoadEvent(object sender, EventArgs e)
  {
      if (!authorizer.IsAuthorized())
      {
          var authurl = authorizer.GetLoginUrl(new HttpRequestWrapper(Request));
          CanvasRedirect(authurl.ToString());
      }
  }
  </code></pre>
  
  <p>The premissions dialog doesn't redirect me back to my Canvas Page i.e. apps.facebook.com/myapp instead it redirects me to Canvas URL i.e. mydomain.com/myapp. Any guesses ???</p>
  
  <p>TIA</p>
  
  <p>Nauman</p>