0
votes

I am trying to implement Facebook authentication in my Windows Phone 8.1 Silverlight app.

Here is the Authentication code. AppID = Facebook App ID

public void Authenticate()
{
        Session fb = new Session(AppID);
        fb.LoginWithBehavior("public_profile,publish_actions,read_stream", FacebookLoginBehavior.LoginBehaviorApplicationOnly);
}

I can see the facebook app load and then flicks back to my app with the following error.

{Facebook.FacebookOAuthException: (Calling app's ID doesn't match the ID sent by the calling app - #2005) : Calling app's ID doesn't match the ID sent by the calling app at Facebook.Client.AppAuthenticationHelper.ParseQueryString(AccessTokenData session, String queryString) at MyRun.CustomUriMapper.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at MyRun.CustomUriMapper.<>c__DisplayClass1_0.<b__0>d.MoveNext()}

I done the Facebook configuring as per Configuring Windows Phone Silverlight apps

1

1 Answers

0
votes

Found the Answer, was related to the Product ID. For anyone else with the same issue, you have to ensure the Product ID matches in the following 4 places.

  • Facebook app dev page
  • Package.appxmanifest
  • WMAppmanifest
  • WMAppmanifest - (protocal extention)

NOTE: Doing the above will generally mean that you update your apps Product ID to using the one gerenated by the app store. By doing this you won't be able to debug your app on your phone if you have an installed version of the app. You will need to uninstall the app first.