all of a sudden, I get a strange thing happening in my application when trying to login through facebook. The facebook connection pop-up dialog box will display a blank screen after requesting login information. Usually I expected the window to close, and then the site itself will continue to work, however, it looks like it hanged itself.
I am using the Javascript SDK on Localhost
Here is the code I'm using (copying directly from the facebook documentation):
window.fbAsyncInit = function () { FB.init({ appId: fbAppId, status: false, cookie: true, xfbml: true }); }; (function (d) { var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) { return; } js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; ref.parentNode.insertBefore(js, ref); } (document)); $(document).ready(function () { $("#fb_button_login").click(function () { FB.login(function (response) { if (response.authResponse) { console.log('Welcome! Fetching your information.... '); FB.api('/me', function (response) { console.log('Good to see you, ' + response.name + '.'); }); } else { console.log('User cancelled login or did not fully authorize.'); } }); }); });
Some other notes:
- This happens in all browsers.
- I studied all other posts and cannot find a solution that works for me.
- The console does not display error messages
- During development, I use a separate FB application identifier, which I have installed specifically for localhost with the assigned port that I use (it worked fine for more than 12 months)
- I don't have a sandbox mode.
The URL it points to is here
Thanks guys.
source share