Windows store apps 为什么重定向Uri需要是一个不存在的站点?

Windows store apps 为什么重定向Uri需要是一个不存在的站点?,windows-store-apps,windows-phone-8.1,win-universal-app,Windows Store Apps,Windows Phone 8.1,Win Universal App,我在运行Windows版本的通用应用程序时遇到问题。我正在尝试使用OAuth将应用程序连接到facebook。在Windows Phone端,我可以将重定向Uri设置为自定义Uri,效果很好——结果返回正确的值。但当我尝试在Windows应用商店端使用它时,它不起作用。基本上,结果不会与访问令牌或其他任何内容一起返回,它看起来会返回原始的起始Uri。此外,它实际上不会进入登录页面,而是跳过该部分 此Uri在Windows应用商店中不起作用,但在Windows Phone中起作用 此Uri在Wi

我在运行Windows版本的通用应用程序时遇到问题。我正在尝试使用OAuth将应用程序连接到facebook。在Windows Phone端,我可以将重定向Uri设置为自定义Uri,效果很好——结果返回正确的值。但当我尝试在Windows应用商店端使用它时,它不起作用。基本上,结果不会与访问令牌或其他任何内容一起返回,它看起来会返回原始的起始Uri。此外,它实际上不会进入登录页面,而是跳过该部分

此Uri在Windows应用商店中不起作用,但在Windows Phone中起作用

此Uri在Windows应用商店中工作

var redirectUri = WebAuthenticationBroker.GetCurrentApplicationCallbackUri().ToString();
Uri endUri = new Uri(redirectUri, UriKind.Absolute);
这是使用Uri的代码

#if WINDOWS_PHONE_APP
    WebAuthenticationBroker.AuthenticateAndContinue(startUri, endUri, null, WebAuthenticationOptions.None);
#endif

#if WINDOWS_APP
    WebAuthenticationResult result = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, startUri, endUri);
    await ParseAuthenticationResult(result);
#endif

有人知道这是为什么吗?

您能否编辑您的问题,以明确代码的哪些部分有效,哪些部分无效?代码块和您的评论令人困惑。-如果您已经登录,它将不会进入登录页面-尝试使用不存在的url进行重定向url@Jon我尚未登录Windows应用商店版本的应用程序。我会试试不存在的Uri@jon这很奇怪,我将重定向Uri设置为var redirectUri=http://blsdkf093urlkwej0923upi3rj.sz;这一次起作用了。我还是不明白为什么。
#if WINDOWS_PHONE_APP
    WebAuthenticationBroker.AuthenticateAndContinue(startUri, endUri, null, WebAuthenticationOptions.None);
#endif

#if WINDOWS_APP
    WebAuthenticationResult result = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, startUri, endUri);
    await ParseAuthenticationResult(result);
#endif