Facebook Login is a great way to plug into your user’s social network, offer a more personalized experience, and accelerate viral adoption of your apps.
Today, we are excited to announce that on Windows Store apps and Windows Phone 8 apps, you can easily integrate Facebook Login. Facebook Login lets users sign in to Facebook only one time across multiple devices. If another app then wants to access the users Facebook account, the user just provides consent and doesn’t sign in again.
Let’s take a look at the user experience. The first time the user connects to Facebook they see this:
In this case, the user provides their credentials. If they check “keep me logged in” then the next time an app (which could be yours) requests access to Facebook, the user won’t need to provide their credentials again. Instead the user sees this:
The user just needs to give your app access to the specific information and capabilities provided by Facebook. When the user gives your app consent, your app can continue to access the requested information with no further prompts.
In this post, we’ll walk you through the steps on how to set up your apps for a Single Sign-On experience using Facebook.
Setting up your app
https://www.facebook.com/dialog/oauth?client_id=<Your Facebook App ID>&display=popup&response_type=token&redirect_uri=www.facebook.com/connect/login_success.html
https://www.facebook.com/dialog/oauth?client_id=<Your Facebook App ID>&display=popup&response_type=token&redirect_uri=ms-app://<Your Windows Store Application SID>/
It’s just that easy!
Login with Facebook using Single Sign On via the WebAuthenticationBroker in Windows Store apps offers your users a simple and convenient way of logging into your apps. This enables you to easily provide rich and personalized experiences and take advantage of the viral effect of your user’s social network. To learn more, you can leverage the Facebook C# SDK for Windows Store apps and Windows Phone apps. Check out the Facebook Open Graph APIs that allow you to programmatically publish stories to a user’s Timeline to create personalized user experiences. You can also visit http://developers.facebook.com to learn more about the Facebook social platform and other ways of integrating social functionality in your apps.
--Sanjeev Dwivedi (Technical Evangelist)
This flow works for some FB ID's and not for others. Once logged in ,the dialog is stuck at authorize step "OK"/"Skip" and never returns to the app. However in FB I can see the app's permission is updated under security settings.
This seems to be happening with random accounts ( frequently though). For the same account if the callback URI is anything other than the app SID ( example: www.facebook.com/connect/login_success.html) then it works.
How to logout from the application and sign in as different user after implementing SSO. It is always displaying the first logged in user with the meesage "You have already authorized..."
On windows phone I also receive the same error as Minu_M
"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
Is there something else other than Windows Store ID or Windows Phone Store ID [BETA] which needs to be entered while configuring the App in Facebook? Please advice.
To obtain the Windows Store ID for your app, and to continue integrating the Login with Facebook using Single Sign-On, log in to your Windows Store Dashboard at appdev.microsoft.com/storeportals and follow the rest of the steps listed below.
Web Design Oakland
Also, there was a system message about not to use display=popup. If I change to display=touch I get pass the authorize dialog and I am logged in, but that is not a nice experience.
Hi Sanjeev. I have posted a questing with sample code here:
I have now gone back to using the "old way" of authenticating with having a facebook web app and the good, old www.facebook.com/.../login_success.html callback url. At least it works.
Hi, I followed the steps mentioned above for Facebook SSO in my win8.1 store app -Copied the app SID to Facebook, replaced the redirect_uri with the windows store application SID and used the two parameter version of authenticate async. But I am getting a message like
Can someone please help on this?
Hi Tommy, we have tested the scenario and the Ok button does indeed work. Can you please paste sample code for your login? The message warning you not using display=popup is simply an artifact of you being a developer on the Facebook AppID. It will not be shown to normal users.
Hope that Candy Crush Saga comes to Windows 8, at last!
I'm trying to implement this in my app. It does NOT work. After logging in, the dialog says I have already authorized the app, but the Okay and Skip buttons does not respond and AuthenticateAsync() never returns. Also, there was a system message about not to use display=popup. If I change to display=touch I get pass the authorize dialog and I am logged in, but that is not a nice experience. This is a C#/XAML winrt app for Windows 8.1. Please fix this.