示例#1
0
        public async Task LogInAsync(Activity context)
        {
            if (!await IsLoggedInAsync(context))
            {
                var auth = new OAuth2Authenticator(
                               clientId: Service.ClientId,
                               scope: Service.Scope,
                               authorizeUrl: new Uri("https://m.facebook.com/dialog/oauth/"),
                               redirectUrl: new Uri("http://www.facebook.com/connect/login_success.html"));

                var userAccount = await context.LoginAsync(auth);
                Service.SaveAccount(context.BaseContext, userAccount);
            }
        }