• I got the code for the Facebook like button from Facebook, and created an app for it.

    Placed it on my website by creating a child header using this code from facebook:

    <!– Facebook SDK –>

    <div id=”fb-root”></div>
    <script>
    window.fbAsyncInit = function() {
    FB.init({
    appId : ‘{}’,
    status : true,
    xfbml : true
    });
    };

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

    I also created a child comments.php and added this code so that the like button would be page specific:

    <!– Facebook Comments –>
    <div class=”fb-comments” data-href=”<?php the_permalink(); ?>” data-width=”470″ data-numposts=”10″ data-colorscheme=”dark”></div>
    <!– END Facebook Comments –>

    For some reason whenever “like” is clicked the button displays as “liked” site wide, and it seems that the home page is liked. Also the post that is fed into the users Facebook news feed is visible on a google nexus 7 g2, but when viewing from the latest version of Firefox on desktop the link directs to the facebook “sorry broken link” page. The actual post doesn’t appear at all on the desktop.

    This is an issue because I want users to be able to “like” specific blog posts allowing them to post that specific article to their facebook time line. Not post the website home page.

    Could anyone please help me resolve this? I really don’t know much about php, javascript, or the facebook SDK. I just followed the instructions in setting this up.

    My website is located at: megadopebeatz.com

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Need Help] WordPress & Facebook’ is closed to new replies.