我正在开发一个Xamarin.Forms项目,并且遇到了一个非常奇怪的问题。这段代码实际上是在Xamarin.Droid项目中执行的。调用InvokeApiAsync移动应用程序服务
当我尝试这样做
var user = await client.LoginAsync(this, MobileServiceAuthenticationProvider.Facebook);
if (user != null)
{
try
{
// executes this line
var userInfo = await client.InvokeApiAsync("/.auth/me");
// down here nothing is executed and userInfo is never set with the data
}
catch (Exception e)
{
// never enter to this block
}
}
用户信息变量从未被设定的数据,并没有异常,没有在输出少见。
我已经尝试client.InvokeApiAsync(“/。auth/me”,HttpMethod.Get,null)但没有任何作品。
我知道这是相当短的信息,但我没有别的,因为没有例外引发。
谢谢。