Question

I have a strange problem, I am migrating a Windows Phone 8 app to Windows Phone 8.1 universal app. In that I am using Facebook and Facebook.Client packages. In Windows Phone 8.1 universal app project nuget package manager failed to add Facebook packages into the project by saying the error like Couldn't find any packages that support Windows phone 8.1, after this error I added the Facebook and Facebook.Client references manually from my old Windows Phone 8 project, when I build the project compiler throwing error:

Error 1 Cannot find type System.Windows.Controls.Control in module System.Windows.dll

Actually I added Windows Phone 8 Facebook.Client.dll. So compiler throws this error. After this I have added Windows 8 Facebook.Client.dll, the build succeeded. But when I call facebook Loginasync() method, I am getting NotImplementedException.

Any one help me how to resolve this exception. I guess Facebook packages are not updated to support Windows Phone 8.1 universal app. If so can any one help me how to integrate the Facebook in Windows Phone 8.1 universal app (Windows 8.1 its working fine).

Was it helpful?

Solution

The Facebook package has been migrated to the Universal app stack, however the Facebook.Client package has not. The Facebook.Client version for Windows Phone 8 targets the Silverlight version of the APIs, so it won't auto-magically convert to supporting Windows Phone 8.1 Universal projects. Someone is going to need to port it.

The source can be found here: https://github.com/facebook-csharp-sdk/facebook-winclient-sdk

OTHER TIPS

For Windows Phone 8.1 there is a new step in the login process you need to do.

In OnActivated of app.xaml.cs add the following code:

if (args.Kind == ActivationKind.WebAuthenticationBrokerContinuation)
{
  App.MobileService.LoginComplete(args as WebAuthenticationBrokerContinuationEventArgs);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top