I'm experimenting with Windows Phone apps and live connect. I have this control on my main page:
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" />
Here is the handler for SessionChanged
:
private async void SignInButton_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
{
if (e.Error != null)
System.Diagnostics.Debugger.Break();
...
}
I debug my app using the Windows Phone emulator. When I click the Sign In button, I get this exception:
The provided value for the input parameter 'redirect_uri' is not valid. The client application must be marked as 'mobile' or the value must be an absolute URL which matches the registered redirect URI.
I do not explicitly specify a redirect_uri
anywhere. Why does Sign In fail due to an invalid redirect_uri
?
You must explicity mark your app as 'mobile' in the Windows Store Dev Center.