I output this with hook_link: nid" href={$url}>
and if I manually run Drupal.behaviors.fb(document); with firebug the like button gets rendered correctly but it doesn't do it automatically.
While debugging I noticed that the if (typeof(FB) != 'undefined') check fails (in Drupal.behaviors.fb).
Also if I manually set the xfbml key to TRUE in the $fb_init_settings array in fb_init() function the like button gets rendered.
What am I missing? Why is xfbml set to false?
Comments
Comment #1
emattias commentedThis is what I my hook_link looks like:
Do you have to enable xfbml rendering somewhere or should the above could be enough to render the xfbml to html?
Comment #2
Dave Cohen commentedYou might have some other module(s) enabled which initialize facebook's javascript?
View the source of your page and look for "all.js". You should see it only once in settings.
You might have some other fatal javascript error which prevents this from initializing properly. Use firebug or chrome's console to look for errors.