Posts

Showing posts with the label Facebook App

Fixed Facebook App login issue "The domain of this URL isn't included in the app's domains"

I have been setup and use the Facebook login successfully i my UWP app for sometime. But recent it was failure with error " Can't load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings " when I running the app in "Release" mode in Visual Studio. I am using URL " https://www.facebook.com/v2.12/dialog/oauth?client_id=<XXXX>&redirect_uri=ms-app://{ Windows Store SID }&display=popup&response_type=token&state=1&scope=email ", I found the redirect_uri value which got from the code "WebAuthenticationBroker.GetCurrentApplicationCallbackUri().AbsoluteUri" is changed and not the sane value in the Facebook App setting's Windows Store ID. So I updated the new value to App Settings and then run above URL again, it works! Login to Facebook successfully. By the way, I used "https

Windows.Security.Authentication.Web.WebAuthenticationBroker.AuthenticateAsync throws error "value does not fall within the expected range."

I used Windows.Security.Authentication.Web.WebAuthenticationBroker.AuthenticateAsync to perform Facebook authentication and it always works well. Refer to article https://docs.microsoft.com/en-us/uwp/api/windows.security.authentication.web.webauthenticationbroker However, it didn't work and throws error message "value does not fall within the expected range." recently. I verified the call back URL from " WebAuthenticationBroker.GetCurrentApplicationCallbackUri().AbsoluteUri" and found out that the Windows App Id is changed! So I updated the related Windows App Id in the Facebook App setting's configuration page, and now the authentication works again!