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://www.facebook.com/connect/login_success.html" in
"Valid OAuth Redirect URIs" under "Facebook Login Settings". You can refer to Facebook help https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow

  

Comments

Popular posts from this blog

Top JavaScript courses helping you develop SPFx webPart with ReactJS and AngularJS

Effective LLM Prompting skills

Upload “Power BI Files” only to “Power BI Library” in SharePoint site