Colin
Colin

Reputation: 2487

Facebook Like button showing 0 likes for ALL Facebook pages

UPDATE: So this is big. If you try to link to any facebook page with a like button it doesn't work. Try going to the Facebook like creation page (http://developers.facebook.com/docs/reference/plugins/like/) and entering the URL of any facebook like page (like Stackoverflow's: http://www.facebook.com/stackoverflowpage).

This code was working fine until earlier today and now I'm completely lost as to why it has stopped working. The like button loads, but you can't like it or send a message with it and the like count is 0 (it should be around 350).

Here is the jsfiddle. It's very simple: http://jsfiddle.net/rqR6C/

Every so often and ONLY in Google Chrome's console, I get an error. I've found a few other people experiencing this same error message who also say that it's intermittent. Here's the error:

The frame requesting access set 'document.domain' to 'facebook.com', but the frame being accessed did not. Both must set 'document.domain' to the same value to allow access.

The code:

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
    // Init the SDK upon load
    window.fbAsyncInit = function() {
        FB.init({
        appId      : '464723870207650', // App ID
        channelUrl : '//'+window.location.hostname+'/channel.php', // Path to your Channel File
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true,  // parse XFBML
        frictionlessRequests: true
        });
    }

    // Load the SDK Asynchronously
    (function(d){
        var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
        if (d.getElementById(id)) {return;}
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        ref.parentNode.insertBefore(js, ref);
    }(document));
</script>
<div class="fb-like" data-href="http://facebook.com/pages/Grouptonescom/160798537354204" data-send="true" data-layout="button_count" data-width="180" data-show-faces="false"></div>​

Upvotes: 8

Views: 7528

Answers (1)

Dan Dascalescu
Dan Dascalescu

Reputation: 152036

UPDATE: A friend who works at Facebook confirmed this was a bug, and now it's just been fixed. Here's a screenshot of the Starbucks page for posterity:

Starbucks.com has 0 FB likes


The cause of zero likes is having the fb:like href set to your Facebook page. This is a bug, as the Facebook docs for the plugin officially state:

Can I link the Like button to my Facebook page?

Yes. Simply specify the URL of your Facebook page in the href parameter of the button.

Someone else noticed this here on SO - Adding your Facebook Fan Page URL to the LIKE button doesnt work anymore?

Facebook made a recent announcement about Like migrations (2011-Nov-7), so it looks like they broke something in the process.

I've added a <meta property="fb:app_id" content="..." /> line, where the app ID was pulled from https://graph.facebook.com/ (not sure if that's correct though). Didn't help. Still can't point to our fan page.

Trying to report this issue to Facebook is an exercise in futility. The Known Issues page seems largely abandoned, BUT there is a contact form for Facebook Business Pages under "tell us more". I suggest as many of us as possible use that form to report this problem. Here is my report:

Since the Nov. 7 migration of the like plugin, linking the Like button to a Facebook page will show zero likes for that page. Examples include http://fundersandfounders.com/ (which links to https://www.facebook.com/fundersandfounders with 17,000 likes).

Upvotes: 6

Related Questions