facebook-csharp-sdk / facebook-winclient-sdk

Facebook SDK for Windows & Windows Phone
http://facebooksdk.net
Apache License 2.0
61 stars 139 forks source link

WP8 - FacebookUriMapper redirecting to wrong Uri #85

Open igorkulman opened 9 years ago

igorkulman commented 9 years ago

Windows Phone 8 Silverlight, in my FacebookConfig.xml I have

<RedirectPage Name="/Views/LoginView.xaml" />

When I initiate login using

Session.ActiveSession.LoginWithBehavior("email,public_profile", FacebookLoginBehavior.LoginBehaviorMobileInternetExplorerOnly);

I log in and the FacebookUriMapper tries to redirect me to '/181388238617107'

and the app crashes with

No XAML was found at the location '/181388238617107'

I would expect the FacebookUriMapper to redirect me to /Views/LoginView.xaml as stated in the FacebookConfig.xml.

igorkulman commented 9 years ago

Just noticed that the wrong Uri is exactly the Facebook app id defined in FacebookConfig.xml

<Facebook AppId="181388238617107" />
DimitarHPopov commented 9 years ago

I have the same issue, did you find solution ?

N-Simoso commented 9 years ago

I encountered the same problem. But found a fix...

Build from source and apply this: https://github.com/facebook-csharp-sdk/facebook-winclient-sdk/commit/77141cce3346ec00075cc88d2298fb239e797972

igorkulman commented 9 years ago

@DimitarHPopov I created my own uri mapper parsing the uri "by hand". @N-Simoso looking at the code, calling Wait() and .Result on tasks is a bad practice that can deadlock the thread.

N-Simoso commented 9 years ago

@igorkulman You're absolutely right, but as I'm currently still in development phase this does suit my needs. When the moment comes to move this to testing, there is quite some more stuff to check before the code could be considered stable. ;)

The reason that I currently use this is to enable the app to at least pass the login without a hassle. So the quick and dirty solution suits my needs (for now).