質問

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