1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Facebook Like Plugin Not Working

Discussion in 'Web Design & Development' started by peterinwa, Nov 30, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. peterinwa

    peterinwa Thread Starter

    Joined:
    May 29, 2004
    Messages:
    115
    First a question for someone that uses one!

    I created a FB page basically to advertise my website. What I'm confused about is whether the URL in the plugin should be that of the FB page, or my website itself. And if it can be either, why would you chose one vs. the other?

    Real FB novice here!

    Second, I dropped the Like button code generated on FB into this simple webpage, and I get nothing displayed at all. Same in my actual website, but this will be simpler to look at. Any ideas?

    Thanks so much,

    Peter

    I work in HTML and some JavaScript, but don't understand much of the below code:

    Code:
    <html>
    <head>
    <title>Blank Screen</title>
    </head>
    <body>
           
    <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>
    
    <div class="fb-like" data-href="http://www.TherapyDogOrganizations.net" data-send="false" data-layout="box_count" data-width="55" data-show-faces="false" data-font="verdana"></div>
    
    </body>
    </html>
     
  2. Ent

    Ent Josiah Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,409
    Which do you want to promote more?
    When someone pushes the like button, it adds a link to that page to their newsfeed/wall/profile/whatever facebook is calling it this week. If you think it's more useful to send people to the main site, the like button should point to the main site. Conversely if you care more about the facebook page, have the button point to the facebook page.

    In theory you could add a like button for anything on your site, even a like button for google, but I'm not quite sure why you'd want to.
     
  3. peterinwa

    peterinwa Thread Starter

    Joined:
    May 29, 2004
    Messages:
    115
    Thank you Josiah.

    I had assumed that you could only Like a Facebook page, so I'd never thought about Liking my website and hadn't thought it out. I created my Facebook page to attract people on Facebook to my website. But there's no need to send people to my Facebook page if I can send them directly to my website, so I'll have the Like button Like my website.

    Now I just have to figure out why the code isn't putting the Like button on my website.

    Peter
     
  4. Ent

    Ent Josiah Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,409
    A few possibilities:
    You're using an unsupported browser. Opera, for example, just doesn't work. It's annoying, but at least there aren't that many Opera users.
    You have an error in the code. For example if you're trying to put the like button inside an illegal element (such as a span) it may not appear.
    You have a privacy guard such as Ghostery for Firefox installed, which takes out facebook buttons.

    Those are a few issues I've encountered, to see exactly what you'd be after would require looking at your code.
     
  5. peterinwa

    peterinwa Thread Starter

    Joined:
    May 29, 2004
    Messages:
    115
    Thanks again, but I solved it. It simply wasn't displaying when I was looking at the code on my hard drive. When I moved it to the web, it appeared.

    Thanks for your help.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1079008