Jump to content

Adding a Facebook "like" button to our home page


vidmarc

Recommended Posts

Shouldn't this option be part of the Facebook social media plugin already installed? It would simply mean adding an option in the skin for it to work without having to made manual edits (which I am no longer going to do).

 

Basically you need to add an iFrame:

<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nucleusfilms.com&amp;width=150&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=21&amp;appId=186862398157406" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"></iframe>

Or it can be done with HTML5:

 

Initialize the JavaScript SDK using this app:

 

Include the JavaScript SDK on your page once, ideally right after the opening <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_GB/sdk.js#xfbml=1&appId=186862398157406&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Place the code for your plugin wherever you want the plugin to appear on your page.

<div class="fb-like" data-href="http://www.nucleusfilms.com" data-width="150" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>

Or a simple url:

 

Use this URL in an iframe or as a link to your plugin.

http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nucleusfilms.com&width=150&layout=button_count&action=like&show_faces=true&share=true&height=21&appId=186862398157406
Link to comment
Share on other sites

There is a Facebook plugin, and comparing the plugin between CC521 and CC5212, there are a couple of differences.

 

Those differences would seem to have the plugin work better and be effective on product pages.

 

The skin template file content.product.php also has a Facebook image tag that is not present in CC521.

 

So, (according to your SIG) maybe just fetching CC5212 and replacing the Facebook plugin in your installation might get you step further along?

Link to comment
Share on other sites

Thanks for the feedback.

 

I have the Facebook plugin enabled. I also have the latest CC installed and the latest Blueprint theme installed. How do I upgrade the Facebook plugin? It sounds a bit confusing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...