Closed graygilmore closed 10 years ago
The like button requires the exact same code. On the first instance Socialite will embed this and it does the work, following instances are created with an iframe. It's very likely that because this already exists for Facebook Comments the first like button fails.
I'll push up a fix soon. Thanks for the bug report!
Pushed a fix.
By the way, you could remove that code entirely and just keep the single .fb-comments
element. If you have a Facebook like button on the page Socialite will trigger the comments too. In future, I'll include the comments class so Socialite looks for it.
I'll check out the fix.
Your other option works unless you're displaying comment counts on the page (eg, "8 Comments") as those need to be loaded before any of the share buttons get triggered.
I see — good point!
To be honest, if you're using Facebook Comments (or other plugins) it might be less hassle to just bite the bullet and use their .fb-like
element for the Like button to avoid confusion — at least until Socialite adds broader support. The JavaScript SDK include is one of the biggest resources which you won't be able to defer for long in this scenario.
Going to rework fb integration to hopefully cure these issues. For now, closing the issue and setting it to milestone v2.1
Facebook Comments require the following code to be present on the page:
This seems to cause some sort of conflict with Socialite. If that code is already present on the page, the Facebook Like button will not display. Has anyone else run into this? I feel like I'm missing something simple here.