开发者

Check if FB.Init is done to start other scripts

i want to start a function after the Init is done.

FB.init({
    appId  : 'XXXXXXXXXXXXX',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true, // parse XFBML
    oauth  : true, // enable OAuth 2.0
});开发者_StackOverflow社区

After i done that i want to check if the Init is done and start somethink like

doMyFunctions();

But how can i check that the Init is done? If i try to start my function directly after the init i did not become data from the FB.Data.query functions.

Hope you can help me.


Check out https://github.com/xocialhost/jquery.xocialCore.js/blob/master/jquery.xocialCore.js

and look at the first function. Around line 71 is where you would put your function call. This is wrapped in a jQuery function but if you don't use jQuery you should be able to extract the code you need from the function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜