Trying to add Facebook Like button on "OPTI" theme

  • Unknown's avatar

    Hi ,

    I am new to wordpress. I am trying to add facebook like at the end of each post (allowing users logged in to FB to like the post). I copied the code generated by FB developers page at the end of my post (text version of the editor ) but I could not get it to work. Please note that the internet site in this code here is not the correct one as my site is still under construction.

    <div class=”fb-like” data-href=”http://policy.com/2013/03/09/welcome/” data-send=”false” data-width=”450″ data-show-faces=”true”></div>

    I am also not sure where to place the other code generated by FB which is as follows.. Any feedback is greatly appreciated!

    <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&appId=423656717721778”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));</script>

  • Unknown's avatar

    You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.

    If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.

  • Unknown's avatar

    Hi ,

    I am new to wordpress. I am trying to add facebook like at the end of each post (allowing users logged in to FB to like the post). I copied the code generated by FB developers page at the end of my post (text version of the editor ) but I could not get it to work. Please note that the internet site in this code here is not the correct one as my site is still under construction.

    <div class=”fb-like” data-href=”http://policy.com/2013/03/09/welcome/” data-send=”false” data-width=”450″ data-show-faces=”true”></div>

    I am also not sure where to place the other code generated by FB which is as follows.. Any feedback is greatly appreciated!

    <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&appId=423656717721778”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));</script>

  • The topic ‘Trying to add Facebook Like button on "OPTI" theme’ is closed to new replies.