Options

add a FB "Like" and "Share" button?

immopiximmopix Registered Users Posts: 16 Big grins
edited May 7, 2015 in SmugMug Customization
Hey guys I'd like to add a like and share button I just dont know where to paste the code :S


heres the code I need to paste after 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.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


and then some other code wherever I want it to be shown on the page:


<div class="fb-like" data-href="https://www.facebook.com/immopix.ca&quot; data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>

thx

Comments

  • Options
    denisegoldbergdenisegoldberg Administrators Posts: 14,238 moderator
    edited May 4, 2015
    The code you have pasted is Javascript; use of Javascript is not supported on SmugMug.

    Does the facebook social icon meet your needs? You can drag in a social icons content block with Facebook set to On.

    --- Denise
  • Options
    immopiximmopix Registered Users Posts: 16 Big grins
    edited May 4, 2015
    no I would really like a like and share button on my page.
  • Options
    Tom FosterTom Foster Registered Users Posts: 289 Major grins
    edited May 7, 2015
    You can do it. You need that bottom bit of code you mentioned and put that were you want it on the page. As long as you also have the Smugmug Share content block (or whatever it's called... The social one that isn't the social icons) somewhere else on the page then it should work fine as Smugmug deals with the javascript side of things.
    As far as I'm aware there's no other way of doing it!
    You may then be able to hide the Smug Share content block thing with CSS and get the FB one to still display, I'm not sure about that!
Sign In or Register to comment.