Facebook Like Box plug-in not working on web page test

20,099

Solution 1

I think the problem is with the code generator. I also faced the same problem. This was what I did to solve it:

Change the following line:

js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";

To:

js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1"; 

Solution 2

The answer is more simple than what everyone here saying. All you need to do is to upload your HTML file online and test online and that will work.

This will not work on your local machine. I hope this helps.

Solution 3

You must have a Facebook Fan Page in order to use the Like Box Social Plugin. The Like Box plugin doesn't show your wall since your account is only a personal profile. Try with any fan page and it will work fine.

For example, replace: https://www.facebook.com/ginger.lindbergh

With: http://www.facebook.com/AxtraRD

Aditionally you could convert your Facebook Profile to a Fan Page. Following steps described here: https://www.facebook.com/help/116067818477568/

Solution 4

Change line from this:

js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";

To this:

js.src = "**http:**//connect.facebook.net/en_US/all.js#xfbml=1"; 

And upload online! That solved my problem...

Share:
20,099
galindbergh
Author by

galindbergh

Updated on September 09, 2020

Comments

  • galindbergh
    galindbergh over 3 years

    I have just copied & pasted code from https://developers.facebook.com/docs/reference/plugins/like-box/

    Here's a test page: http://net-gal.com/fbTest.html

    I have viewed the page in Mac/Firefox & Safari plus pc/IE, and the plug-in puts lots of blank space but no Facebook feed.

    How can I make my Facebook feed appear on the page?

    under body tag:

    <div id="fb-root"></div>
    <script>(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'));</script>
    

    in page to display:

    <div class="fb-like-box" data-href="http://www.facebook.com/ginger.lindbergh" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div>
    

    I added another test page that works using facebook developers page ID. See test page: net-gal.com/fbTest2.html

    The code was changed to: data-href="http://www.facebook.com/platform"

    So it appears the plug-in is working but not the link to my facebook page. Is it my facebook security settings? I checked & they seem fine. I also replaced my text link with my numeric id link and results were the same; there was no feed. I added a new status update to my page but that didn't change it either. But I have eliminated the actual plug-in; it does work.

    I am at a loss; can anyone help by telling me what I need to do to get this code to pull up my facebook like box?

  • Patrik Beck
    Patrik Beck almost 10 years
    This helped, my FB page was not published, had the same problem.
  • SoliQuiD
    SoliQuiD over 8 years
    Thank You sooooo much.... i was testing it on my local machine which was the problem
  • vanguard69
    vanguard69 over 8 years
    Correct. This seems funny though. I wasted about 1 hour trying on my Local machine w/o any result.
  • chipit24
    chipit24 over 7 years
    You don't necessarily need to upload it anywhere. You can still test it locally with something like http-server