facebookfacebook-javascript-sdk

JSSDK Unknown Host domain


With the new Facebook changes on August 1, 2021 (I think) the Developer Dashboard > Facebook Login settings have been updated and now include a Allowed Domains for the JavaScript SDK section.

The Problem

I cannot add a port number to the domain like I can in the Valid OAuth Redirect URIs section. After clicking Save Changes the port numbers are removed from the entries. Our app is currently in development, and while serving the app from https://www.example.localhost:4200 we are given the error while using the Facebook JavaScript SDK:

JSSDK Unknown Host domain: The Domain you are hosting the Facebook Javascript SDK is not in your app's Javascript SDK host domain list. Please specify your host domain in App dashboard login settings.

Facebook Error Image


Solution

  • The same problem, but I used the field "Authorized domains for the JavaScript SDK" with the URL and port and it works.

    Here with your URL: FB App

    (I used Chrome english translation, sorry if the fields doesn't have the same words ;) )