Bear River Web Design in Auburn California

Add Facebook Recommend button on your site

10.10.2011
Written by: J. Zatkulak
If you want to add a Recommend button to your dynamic Joomla website that points directly to the article the visitor is viewing you have a few options. There are some modules that you can install to add a Facebook "LIKE" button into each article, however you may want to put one dynamic link in your index page so that it will work on every page instead of just articles that you have inserted the module code.

How to Add Facebook Recommend button on your Joomla site:

  1. -> Connect to your site via FTP, using a text editor or Dreamweaver
  2. ->Get the page in /templates/yourthemename/index.php
  3. ->Go to the location in your source code that you would like to insert the dynamic facebook "recommend" button
  4. ->Drop this code in the body tag:
    <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.5&appId=1667686003501809"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
  5. ->Place the code for your plugin wherever you want the plugin to appear on your page.
    <div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="standard" data-action="recommend" data-show-faces="true" data-share="true"></div>