Probably set a flag in your fbAsyncInit function and check it in jQuery loading:
$(handleLoad); function handleLoad() { if (!facebookLoaded) { setTimeout(handleLoad, 10);
I expect that there is already some global one that you can check if Facebook is loaded (I did not use the Facebook API). If not, you can use your own flag (ideally not global):
(function() { var fbLoaded = false; window.fbAsyncInit = function() { fbLoaded = true; }; jQuery(handleLoad); function handleLoad() { if (!facebookLoaded) { setTimeout(handleLoad, 10);
source share