Facebook Share Button

12 views
Skip to first unread message

abic...@brsu.org

unread,
Sep 29, 2011, 1:58:46 PM9/29/11
to haik...@googlegroups.com
I can not seem to get the Facebook Share button code to work.
Here is what I ahve fro my code:

<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;
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-like" data-send="false" data-layout="standard" data-width="450" data-show-faces="false" data-action="like" data-colorscheme="light"></div>

Jonathan Jarc

unread,
Sep 30, 2011, 8:34:54 AM9/30/11
to Haiku LMS Users Group
If you are using a version of IE, or a version of FF that does not
support HTML5, you need to add a header to your page. This might not
be possible, but you need to make sure that you add it somewhere. In
order to support earlier Internet Explorer versions with XFBML, you
also need to add an XML namespace to the HTML tag of your document, as
shown below. For more details, please read the JavaScript SDK
documentation.

<html xmlns:fb="https://www.facebook.com/2008/fbml">

Alex Dugger

unread,
Sep 30, 2011, 6:40:05 PM9/30/11
to Haiku LMS Users Group
While John is correct about the IE limitation, the code problem here
is actually with out content filter. We don't allow JavaScript in
text areas to block unsafe code that could break the Haiku interface,
reveal secure content to others, or subject users to outside malicious
content. This is why we have the Embed the Web tool. It lets us
filter out unsafe code while still allowing safe and functional
widgets to be used in your class pages. Unfortunately this Facebook
widget is written in such a way that our current filter can't possibly
handle it, so there's no way to include it in the Embed the Web
library.

In many cases you can work around this situation by using a MiniSite,
but with the way the Like button works that isn't a very good option
either. The button sends the url of the current page back to
Facebook, and using it on a MiniSite will send a link to the MiniSite
page (hosted on Amazon's S3 server) not a link to your Haiku Class
page. Again, this is safe, but not very effective.

There is one other option, which is to use a Facebook widget from
AddThis (www.addthis.com). Their widget code is written in a way that
makes it much easier to use with Embed the Web. I had to update our
filter to account for some changes they made recently, but I tested it
this morning and it should be working now. Give this a try and let me
know if you have any questions or trouble.

Thanks.

Alex
Haiku Learning Systems

On Sep 29, 1:58 pm, abickf...@brsu.org wrote:
Reply all
Reply to author
Forward
0 new messages