Title: [Need Help] WordPress &amp; Facebook
Last modified: August 21, 2016

---

# [Need Help] WordPress & Facebook

 *  [megadopebeatz](https://wordpress.org/support/users/megadopebeatz/)
 * (@megadopebeatz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/need-help-wordpress-facebook/)
 * 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)

 *  Thread Starter [megadopebeatz](https://wordpress.org/support/users/megadopebeatz/)
 * (@megadopebeatz)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/need-help-wordpress-facebook/#post-4582074)
 * it’s not working at all.

Viewing 1 replies (of 1 total)

The topic ‘[Need Help] WordPress & Facebook’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [megadopebeatz](https://wordpress.org/support/users/megadopebeatz/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/need-help-wordpress-facebook/#post-4582074)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
