So...on a site I'm working on, there's a Facebook "Like" button that's supposed to turn gray after you click it, and to un-like you click the "X" in the grayed-out "Like" button.
Thing is...it doesn't work properly. In IE9, as soon as you click "Like," the "like" button becomes a small text box that, upon closer examination, is actually a Facebook comment window that attempts to fit in the slot! In Firefox and Safari (each on Windows 7), if you click "Like," the button turns gray as it should, but sometimes (seemingly randomly), if you try to "unlike" by clicking the "X," it becomes the very top of my FB profile pic, and again it appears to try to cram a Facebook window into that slot.
I do NOT want a Facebook comment window or ANYTHING -- I just want the FB "Like" button to toggle.
As per the FB developer info, I have this before the Javascript:
<div id="fb-root"></div>
Right after that, I have:
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
The code around the button, again as per the FB developer page, is:
<div class="fb-like" data-href="http://www.facebook.com/(page to be liked)" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>
The site is not online yet, so I can't really provide a link so you can try it, nor can I put it up online somewhere right now.
Also, the original code had the above-mentioned Javascript but at the end of the js.src assignment was an appid. Removing that made no difference.
There's also a link to Twitter that uses similar variables, but I tried removing that all together to no avail; thought maybe it was interfering.
What else should I be on the lookout for??
(BTW, I cannot reproduce the issue in Chrome or Opera. In fact, in Opera, the rendering is kind of slow. It looks like this happens: 1) Click "Like." 2) That thing that looks like a text box but is actually a compressed FB comment box appears. 3) The grayed-out "Like" button appears. If you click to disconnect, the same thing happens in reverse. I'm starting to think this might be a bug on Facebook's end rather than mine.)