21487 Posts in 5783 Topics by 2621 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1824 Views |
-
adding simple Facebook "like" button

6 February 2012 at 12:54pm Last edited: 6 February 2012 12:55pm
Hey there - newbie here and brand new to SS. I've already figured out how to add Paypal button functionality into my page templates, but I'm stuck on adding a simple Facebook "Like" button. I've gotten the code from Facebook and coded the page template file (Page.ss), but the button isn't showing up.
What am I doing wrong?
Thanks!!
Edit: using SS 2.3.4
-
Re: adding simple Facebook "like" button

6 February 2012 at 7:40pm
Would you be able to put up a sample of the code you tried to embed in the page?? This would help in diagnosing the issue.
-
Re: adding simple Facebook "like" button

7 February 2012 at 4:21am
Yes - here is the code:
As per the instructions from Facebook, first added the following:<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/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>then the rest:
<div class="fb-like" data-href="http://www.solaceinternational.org" data-send="true" data-width="450" data-show-faces="true" data-action="recommend"></div>
thanks for any help!
-
Re: adding simple Facebook "like" button

14 February 2012 at 10:55am
Facebook recommends putting the <script> code in the head, so I would try that first. Then put the divs within the page body.
-
Re: adding simple Facebook "like" button

19 November 2012 at 6:27pm Last edited: 19 November 2012 6:27pm
hi @scottsaz
I've created a simple Facebook module that incorporates the Like functionality into two lines of template code.
After the body tag add this
<% include DownloadFacebookJS %>
Where you require the Like box, add this to your template
<% include FacebookLikeButton %>
The module also incorporates the option of including Facebook metadata and of displaying a Facebook LikeBox page on your website.
For more information see Web of Talent - Facebook Module or GitHub - Gordon Anderson - Facebook Module
Cheers
Gordon
| 1824 Views | ||
|
Page:
1
|
Go to Top |


