I am trying to figure out a simple code for logging in facebook from a Windows Phone 8.1 app (C#).
As the Facebook Client from NuGet doesn\'t target Win
You might want to take a look at this: Sign into Windows Phone 8 apps with Facebook Login.
This tutorial on the Microsoft blogs shows you how you can tie directly into the Facebook app from your app like many do on Android and iOS.
In the Package.appxmanifest file, go to 'Declarations' Tab and add a Protocol Declaration.
In the Name Field, enter your Microsoft product id as 'msft-PRODUCT_ID' [product id without dashes].
In the App.xaml.cs file, add the following code
protected override void OnActivated(IActivatedEventArgs args)
{
if (args.Kind == ActivationKind.Protocol)
{
ProtocolActivatedEventArgs eventArgs = args as ProtocolActivatedEventArgs;
Uri responseUri = eventArgs.Uri;
//Now you can use responseUri to retrieve the access token and expiration time of token
}
base.OnActivated(args);
}