Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jacob 1 post 50 karma points
    Oct 23, 2013 @ 05:36
    Jacob
    0

    Facebook Like-Box

    have tried to add the Facebook Like-Box to Umbraco but I cannot get it to work. 

    I have tried to add the IFRAME tag () directly to the HTML part of the page and to create a new macro where the IFRAME tage is the only direct content and then add the macro to the content page directly. But neither works.

     

    ___________________________________________________

    download ultrasurf : http://betdownload.com/ultrasurf-6-download

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 23, 2013 @ 08:09
    Dennis Aaen
    0

    Hi Jacob and welcome to our :-)

    I have just implementet a facebook like box on one of my dev sites, and I use this code inside my XSLT file,

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxml="urn:schemas-microsoft-com:xslt"
        xmlns:fb="urn:facebook.com:xslt"
        xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:Examine="urn:Examine" xmlns:google.maps="urn:google.maps"
        exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets Examine google.maps ">

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">
    <!-- start writing XSLT -->

    <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/da_DK/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
       
       
    <div class="fb-like-box" data-href="https://xxxxxxxxxx" data-width="400" data-height="400" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>

    </xsl:template>
    </xsl:stylesheet>

    After that I just add the macro where I want the Facebook like box to appear. So with the piece of code you should get a Facebook like box on your site.

    Just remember to change the data-href="https://xxxxxxxxxx" to your Facebook page.

    Hope this helps

    /Dennis

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 28, 2013 @ 19:43
    Dennis Aaen
    0

    Hi Jacob,

    I hope that you was able get a Facebook Like-Box on your website, by using my suggestion to the XSLT code.

    /Dennis

  • jkiller 0 posts 50 karma points
    Nov 11, 2013 @ 09:06
    jkiller
    0

    thank for share

Please Sign in or register to post replies

Write your reply to:

Draft