add a FB "Like" and "Share" button?
immopix
Registered Users Posts: 16 Big grins
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" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
thx
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" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
thx
0
Comments
Does the facebook social icon meet your needs? You can drag in a social icons content block with Facebook set to On.
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com
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!
My Photography Blog.
My Popular Photos
- Photos of Edinburgh, Scottish Highlands and Islands, Fife.