title: Authentication with Facebook by using Xamarin.Auth
body: <p>I am using Xamarin.Auth for login with facebook in my app(android/iOS) and all is going well but when successfully loged in, facebook profile is opening and not going back to my application. i want to redirect to my app's home page without showing facebook profile. i am following this <a href="https://github.com/jsauve/OAuthTwoDemo.XForms" rel="nofollow">tutorial</a> and not get any success. i think i am not giving proper Urls of my app. Please give me suggestions.
  your help will be appreciated thanks in advance.</p>
  
  <p>here is my code of loginPageRenderer: </p>
  
  <pre><code>[assembly: ExportRenderer (typeof (FBLoginPage), typeof (LoginPageRendrerr))]
   namespace FFirst_app.Droid
   {
  public class LoginPageRendrerr : PageRenderer
  {
      protected override void OnElementChanged(ElementChangedEventArgs&lt;Page&gt; e)
      {
          base.OnElementChanged(e);
  
          // this is a ViewGroup - so should be able to load an AXML file and FindView&lt;&gt;
          var activity = this.Context as Activity;
  
          var auth = new OAuth2Authenticator (
              clientId: "7b745e26dbb64e1a3a3bf6bfd33165bc", // your OAuth2 client id
              scope: "basic", // the scopes for the particular API you're accessing, delimited by "+" symbols
              authorizeUrl: new Uri("https://apps.facebook.com/myappppppp"),//("https://api.instagram.com/oauth/authorize/"), // the auth URL for the service
              redirectUrl: new Uri ("http://www.facebook.com/connect/login_success.html")); // the redirect URL for the service
  
          auth.Completed += (sender, eventArgs) =&gt; {
              if (eventArgs.IsAuthenticated) 
              {
                  App.SuccessfulLoginAction.Invoke();
  
                  // Use eventArgs.Account to do wonderful things
                  App.SaveToken(eventArgs.Account.Properties["access_token"]);
  
                  string sessionToken = App.Token;   //  /* Authenticate the user with Facebook and fetch a session token */;
                  DateTime expiration =  DateTime.Today;  ///* The expiration time for the session token */;
                  string facebookId = Constants.FBAppId;
                   ParseFacebookUtils.LogInAsync (facebookId, sessionToken, expiration);
  
              } else {
                  // The user cancelled
              }
  
  
  
          };
  
          activity.StartActivity (auth.GetUI(activity));
      }
  }
  
   }
  </code></pre>