Windows runtime Windows Phone 8.1中的谷歌登录
我正在尝试使用谷歌API登录WindowsPhone8.1。 我有这个方法:Windows runtime Windows Phone 8.1中的谷歌登录,windows-runtime,windows-phone-8.1,Windows Runtime,Windows Phone 8.1,我正在尝试使用谷歌API登录WindowsPhone8.1。 我有这个方法: public async Task<bool> AuthenticateAsync() { var Credential = await GoogleWebAuthorizationBroker.AuthorizeAsync( new Uri("ms-appx:///Shared/Jsons/client_secrets.json"),
public async Task<bool> AuthenticateAsync()
{
var Credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
new Uri("ms-appx:///Shared/Jsons/client_secrets.json"),
new[] { PlusService.Scope.PlusLogin},
"user",
CancellationToken.None);
System.Diagnostics.Debug.WriteLine($"Credential: {Credential}");
var loginSuccess = await NetworkManager.LoginWithGoogle(Credential.Token.AccessToken);
return loginSuccess;
}
public异步任务AuthenticateAsync()
{
var Credential=await GoogleWebAuthorizationBroker.AuthorizationAsync(
新Uri(“ms-appx:///Shared/Jsons/client_secrets.json"),
新[]{PlusService.Scope.PlusLogin},
“用户”,
取消令牌(无);
System.Diagnostics.Debug.WriteLine($“凭证:{Credential}”);
var loginsucess=await NetworkManager.LoginWithGoogle(Credential.Token.AccessToken);
返回登录成功;
}
GoogleWebAuthorizationBroker.AuthorizationAsync()之后的所有内容都不会执行。
此外,如果我尝试调试,我会在该指令上设置断点,当我进一步调试时,我会看到应用程序退出该方法,而不会执行所有其他指令。
我也不例外,所以我不知道为什么
有什么提示吗