Facebook Like button showing 0 likes for ALL Facebook pages
Asked Answered
V

1

8

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>​
Verdieverdigris answered 14/11, 2012 at 2:25 Comment(5)
Where's your fb-root div? Are there any error messages in your browser's console?Neona
Also, might just be something to do with hosting code on jsfiddle, but I see this error message; "Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."Neona
The error only occurs in Google Chrome and intermittently at best. I can't get it to appear in Safari's console ever. I added the fb-root and on my console in chrome I am getting this 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 accessVerdieverdigris
It's a FB bug. I've updated my answer.Lefevre
Facebook just fixed the issue.Lefevre
L
6

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).

Lefevre answered 14/11, 2012 at 3:44 Comment(3)
Yeah it looks like it's impossible to do this right now. Any idea of it's temporary or not?Verdieverdigris
I originally accepted this answer, but I think it only answers the question "why" and not the question "how." I'm also just really confused by what this Facebook page is saying about what we are all trying to accomplish; linking a Facebook Page to a link button on a website. Is that no longer possible or is it just really complicated?Verdieverdigris
I haven't found a way to fix this, and I'm not sure if it's a transient error on Facebook's part, or if they've just disabled linking to Facebook pages. So I don't think my answer yet should be accepted. Note also that it's been impossible to merge the likes of a fan page with the likes for a URL.Lefevre

© 2022 - 2024 — McMap. All rights reserved.