Using Facebook Login on Windows Phone 8.1

Asked

Viewed 55 times

3

I am developing a Windows Phone 8.1 application and it is necessary to use Facebook login. Someone would have an example of how to log in?

Thanks in advance.

1 answer

2

To call facebook app can do so:

string url = string.Format("fbconnect://authorize?client_id={0}&scope={1}&redirect_uri=msft-{2}:authorizeByFacebook", ConfigConstants.FacebookAppID(), ConfigConstants.FacebookPermitions(), ConfigConstants.AppID().Replace("-", ""));
await Windows.System.Launcher.LaunchUriAsync(new Uri(url));

Then in the Manifest (where it says prod_id put your Productid without the "-")

<Extensions>
  <Protocol Name="msft-PROD_ID" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" />
</Extensions>

When the app starts again you can see the protocols and then take the token from facebook!

I hope it helps

Browser other questions tagged

You are not signed in. Login or sign up in order to post.