Title: Short codes for FB Commenting
Last modified: August 22, 2016

---

# Short codes for FB Commenting

 *  Resolved [amenwolf](https://wordpress.org/support/users/amenwolf/)
 * (@amenwolf)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/short-codes-for-fb-commenting/)
 * Hi,
 * Do you provide a shortcode for the FB Commenting?
 * [https://wordpress.org/plugins/super-socializer/](https://wordpress.org/plugins/super-socializer/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Rajat Varlani](https://wordpress.org/support/users/the_champ/)
 * (@the_champ)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/short-codes-for-fb-commenting/#post-5298721)
 * Hi,
    Sorry, there isn’t any shortcode for FB Commenting currently. For now, you
   can place following code where you want to enable Facebook Commenting, after 
   switching post/page editor to “Text” mode.
 *     ```
       <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.0";
         fjs.parentNode.insertBefore(js, fjs);
       }(document, 'script', 'facebook-jssdk'));</script>
       <div class="fb-comments" data-href="WEBPAGE_URL" data-numposts="5" data-colorscheme="light"></div>
       ```
   
 * Replace WEBPAGE_URL in above mentioned code with the webpage url on which you
   want to comment.
 *  Thread Starter [amenwolf](https://wordpress.org/support/users/amenwolf/)
 * (@amenwolf)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/short-codes-for-fb-commenting/#post-5298792)
 * Thanks for the reply.
 *  [Darryl Erentzen](https://wordpress.org/support/users/erentzenco/)
 * (@erentzenco)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/short-codes-for-fb-commenting/#post-5299000)
 * … Or you could make your own shortcode by putting the following into your theme’s“
   functions.php”:
 *     ```
       function my_fb_social_commenting () {
       echo '<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.0";
         fjs.parentNode.insertBefore(js, fjs);
       }(document, 'script', 'facebook-jssdk'));</script>
       <div class="fb-comments" data-href="http://"' . $_SERVER['HTTP_HOST']  . $_SERVER['REQUEST_URI'].'" data-numposts="5" data-colorscheme="light"></div>';
       }
       add_shortcode('my_fb_comments','my_fb_social_commenting');
       ```
   
 * Then just use [my_fb_comments] wherever you want.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Short codes for FB Commenting’ is closed to new replies.

 * ![](https://ps.w.org/super-socializer/assets/icon-128x128.png?rev=1866723)
 * [Social Share, Social Login and Social Comments Plugin - Super Socializer](https://wordpress.org/plugins/super-socializer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/super-socializer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/super-socializer/)
 * [Active Topics](https://wordpress.org/support/plugin/super-socializer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/super-socializer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/super-socializer/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Darryl Erentzen](https://wordpress.org/support/users/erentzenco/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/short-codes-for-fb-commenting/#post-5299000)
 * Status: resolved