After the great news about Facebook and Microsoft support Facebook SSO I have tried to implement this in a winrt/xaml/c# app for windows 8.1, however I cannot get it to work.
I have registered the app with facebook and set the app's SID in the app's settings.
This is the login code:
Uri sid = WebAuthenticationBroker.GetCurrentApplicationCallbackUri();
string callbackURL = sid.ToString();
String facebookURL = "https://www.facebook.com/dialog/oauth?client_id=" + Uri.EscapeDataString(AppId) + "&display=touch&response_type=token&scope=publish_stream&redirect_uri=" + Uri.EscapeDataString(callbackURL);
var startUri = new Uri(facebookURL);
WebAuthenticationResult result = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, startUri);
This will open the Facebook login dialog, I can log in, and the next dialog says "You have already authorized .
But clicking on the "Okay" or "Skip" buttons gives no response back to my app. AuthenticateAsync() never returns.
If I change the &display parameter to "touch" it works, but this is not what I want since it shows a mobile login web page not designed for this purpose.
What is wrong ?