문제

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

도움이 되었습니까?

해결책

I got it to work by adding ():

<fb:login-button onlogin="MY_APP.my_callback()">

and I don't know why it works :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top