I got it to work by adding ()
:
<fb:login-button onlogin="MY_APP.my_callback()">
and I don't know why it works :)
Pergunta
In what context is the onlogin callback called?
<fb:login-button onlogin="my_callback">
It seems that Facebook Login Button's onlogin
callback will only work if the callback is a property of the window
, i.e.
window.my_callback = function() { MY_APP.my_callback(); }
Is it possible to make this work, for example:
<fb:login-button onlogin="MY_APP.my_callback">
so I can stop cluttering my window
with my_callback
Solução
I got it to work by adding ()
:
<fb:login-button onlogin="MY_APP.my_callback()">
and I don't know why it works :)