Created
April 10, 2015 17:17
-
-
Save gbellmann/e070d0069c6b0b245b3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private MobileServiceUser usuario; | |
private async System.Threading.Tasks.Task Autenticar() | |
{ | |
while (usuario == null) | |
{ | |
string mensaje; | |
try | |
{ | |
usuario = await App.MobileService | |
.LoginAsync(MobileServiceAuthenticationProvider.Facebook); | |
mensaje = | |
string.Format("Has iniciado sesión - {0}", usuario.UserId); | |
} | |
catch (InvalidOperationException) | |
{ | |
mensaje = "Debes iniciar sesión. Inicio de sesión requerido."; | |
} | |
MessageBox.Show(mensaje); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment