Search code examples
javascriptfacebookfacebook-javascript-sdkfacebook-login

Facebook Login Page is blank


Facebook Auth Page is empty, no matter what approach or library I use.

I am trying to create Facebook Business Auth Login Flow, however, I am stuck with the blank page issue. No matter what I try with the link below, I keep getting blank page.

https://www.facebook.com/v16.0/dialog/oauth?client_id=[appId]&redirect_uri=[http://localhost:3000/pageName]

I tried modifying client_id from Live to Developer mode, downgrading version -> v15, v11, v2.3, replacing link with existing domain https://example.com/pageName, changing callback URLs in Developer Facebook Dashboard, adding config_id, yet, nothing works. If someone has insight into budling login flow, I would sincerely appreciate your help.


Solution

  • After some hacking and testing back and forth, I have found a solution. Even though Facebook in Facebook Login says that localhost is automatically configured - it is a lie. The way to workaround is to turn your app into live mode and then redirect to your non-existent page with real domain - it will provide you a real code that you can test. In addition, link has to be formatted following way:

    https://www.facebook.com/v16.0/dialog/oauth?client_id=[your_app_id]&redirect_uri=[your_uri_not_localhost]&config_id=[config_id_in_facebook_login_Configurations]