1

I am using openFB for facebook login.

openFB.login(
            function(response) {
                if (response.status === 'connected') {
                    // do something
                } else {
                    console.log('Facebook login failed');
                }
            }
        )

This opens the login window.
How can I handle an event when the user closes this window without signing in?

bangdel
  • 2,523
  • 5
  • 28
  • 42
donsalari
  • 61
  • 1
  • 2
  • 10
  • create a click handler for the closing element and do your stuff in the handler – Dexter Huinda Jun 06 '15 at 04:53
  • Since this works by implementing the manual login flow, by opening the FB login dialog in a popup window, I think that might not be possible at all – that popup contains content from a different domain, so the Same Origin Policy prevent you from interacting with its content. The `Window.closed` property of the popup could perhaps be watched via in a timer interval – but that would have to be implemented inside the openFB code directly then. – CBroe Jun 06 '15 at 16:29
  • thats really weird. there is no FB event handler? – donsalari Jun 09 '15 at 04:53

0 Answers0