Cannot get FACEBOOK LIKE button code to work

Discussion in 'Facebook API' started by dinrock, Dec 12, 2011.

  1. #1
    I built MY SITE: http://www.danscartoons.com, using FrontPage2002. I am attempting to paste this line of code:

    <div class="fb-like" data-href="http://www.danscartoons.com" data-send="false" data-layout="button_count" data-width="60" data-show-faces="false" data-font="verdana"></div>

    The LIKE button is not appearing - why? See that blank table (black borders) just above those hyperlinks GIFTS/BLOG on left of page? It is supposed to be there but isn't showing . . . the code was pasted in though(???????)
     
    dinrock, Dec 12, 2011 IP
  2. dixcoder

    dixcoder Member

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    26
    #2
    It seems like you have forgot to add this code too to make the like button work.
    Paste the script below and your like button will start functioning.

    <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>
     
    dixcoder, Dec 18, 2011 IP
  3. metysj

    metysj Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    dixcoder is right, but if what he suggested didn't help, try iframes, you usually can't go wrong with that.
     
    metysj, Jan 4, 2012 IP
  4. DevSwift

    DevSwift Peon

    Messages:
    103
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #4
    If you're not engaging the Facebook API for anything other than building a Like button, then just use the iFrame method - it's a fool-proof method.
     
    DevSwift, Jan 4, 2012 IP