我正在尝试使用 Windows Phone 应用程序和实时连接。我的主页上有这个控件:
xmlns:live="clr-namespace:Microsoft.Live.Controls;assembly=Microsoft.Live.Controls"
...
<live:SignInButton ClientId="[my client id, which I registered earlier today]"
Scopes="wl.signin wl.basic"
Branding="Skydrive"
TextType="SignIn"
SessionChanged="SignInButton_SessionChanged" />
这是处理程序SessionChanged:
private async void SignInButton_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
{
if (e.Error != null)
System.Diagnostics.Debugger.Break();
...
}
我使用 Windows Phone 模拟器调试我的应用程序。当我单击登录按钮时,我得到了这个异常:
为输入参数“redirect_uri”提供的值无效。客户端应用程序必须标记为“移动”,或者该值必须是与注册的重定向 URI 匹配的绝对 URL。
我没有明确指定redirect_uri任何地方。为什么由于无效而登录失败redirect_uri?
