Magento Add Facebook Like/Share button to CMS page

  • magento facebook share button

1. Add a meta tag in template/page/html/head.phtml.

<meta property="og:site_name" content=""/>

2. Create a Custom  Variable from System/Custom Variables, name it anything you like,  and paste the bellow code in the Custom Variable’s content area.

<div class="fblike">
<fb:like href="" layout="standard" action="like" font="segoe ui" colorscheme="light" /></fb:like>
<div class="fbshare">
<a name="fb_share"></a>
<script src=""
<div id="fb-root"></div>
/* <![CDATA[ */
window.fbAsyncInit = function() {
FB.init({appId: 'your app id', status: true, cookie: true,
xfbml: true});
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
/* ]]> */

3. To add like/share button to cms or static block, use the “Insert Variable” button to insert the Custom Variable you have just created.

Comments Closed