TheMethod TheMethod - 10 months ago 70
HTML Question

Facebook Like Button popup dialog closing immediatly after clicking

I am simply trying to test a bit of like functionality on a test page and am getting unexpected behavior. When I click the like button the dialog(the one where you can add text and post to your wall) pops up for about half a second before closing by itself. The like button itself turns into a link that says "confirm". I really have the bare bones here and am not sure what could be going wrong. I'm using FBML. Here is the complete code for my test page:

<!DOCTYPE html>
<title>Facebook Like Test</title>

<div id="fb-root"></div>

window.fbAsyncInit = function () {
appId: 'myid',
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true // parse XFBML

// Load the SDK Asynchronously
(function (d) {
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) { return; }
js = d.createElement('script'); = id; js.async = true;
js.src = "//";
} (document));


<h1>Facebook Like Testing</h1>
<fb:like href = ""></fb:like>
<fb:like href = ""></fb:like>
<fb:like href = ""></fb:like>
<fb:like href = ""></fb:like>

I simply appended an arbitrary as a query string to make the hrefs unique. Could anyone tell me what could be going wrong here? Any help would be appreciated, thanks!

Answer Source

Alright I'm going to answer my own question because I found out the issue and would like the answer to be there for anyone else who gets this error.

As it turns out the problem was not with my code but with the href I was specifying. I found the answer here . It has to do with the site I was implementing this on not being known well enough or flagged as "suspicious".