Adding Facebook Comments to Your Site

Updated a month ago ​by Christopher McHale

Advanced Users: Let visitors comment with Facebook Comments!

SET UP A NEW PIXEL CODE

Under Apps, add the following to Pixels as a Wildcard:

<!-- Facebook Comments --> <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/sdk.js#xfbml=1&version=v2.8";  fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>

BUILD YOUR COMMENT SHORT CODE

In order for Facebook Comments to work on your site, you will need a short code. To build your short code, replace "yourwebsite.com" with your domain:

<div class="fb-comments" data-href="http://yourwebsite.com/real-estate-tips/###" data-numposts="5"></div>

ADD THE SHORT CODE TO A POST

Now that you've built your short code, head on over to your Dashboard. Go to Blogs and select the post you want Facebook Comments on.

Once the post is open, select Code View < > to add your short code. You'll need to scroll to the bottom of the post. Then paste your short code.

Scroll down to Find Me to copy the bold part of your Post's URL. This will replace the ### signs in your short code. Once you paste the page identifier into your short code, scroll back up and exit Code View. Save your Post.

Now your Post will have Facebook Comments!

CONNECT YOUR FACEBOOK COMMENTS TO YOUR FACEBOOK PAGE

In order to connect comments to the associated Facebook Page, you will need to create a Facebook App ID.

To do so, first log in to Facebook. Then create a developer account

After your developer account is created, you can create a new App. 

  • For Display Name, name the app "Comments for Plaza Real Estate"
  • Contact email should be the public email used on your site. 
  • For category, select “Apps for Pages.”

Under Dashboard, go to Choose a Platform and select Website.

Copy the script provided in Step 1 and paste it into your Pixel App at the end of Wildcard. It will be under the first Facebook Comments Pixel you pasted.

For step 2, under “Tell Us About Your Website,” add your site’s URL.

If you want to get fancy, you can look into the extra features Steps 3 and 4 offer.

And that's it! Now you have Facebook Comments enabled on your site! If you generated a Facebook App ID, your site's comments are also connected to your Facebook Page!



How did we do?