given the following code: ` const handleFacebookLogin = (e: any) => { console.log('called login')
FB.getLoginStatus(function (response) {
console.log('login status response', response)
if (response.status === 'connected') {
// Logged into your app and Facebook.
console.log('logged in correctly')
} else {
window['FB'].login(function (response2) {
console.log('logged in', response2)
}, fbOptions)
}
})
console.log('finished click handler')
}`
the response returning response2 happens before the user dialog is has even been filled out. I would think that FB would wait for a user name and password BEFORE calling the callback function, or am I crazy?
I have tried everything I can find on SO and all other resources I can find. I would expect that once a user enters FB credentials and the call is made THEN the callback function would happen instead of a linear execution of code.