Copied to clipboard

Flag this post as spam?

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


  • Anders Dahl Tollestrup 73 posts 52 karma points
    Mar 03, 2011 @ 11:54
    Anders Dahl Tollestrup
    0

    Facebook Like buttom outputs umbraco tags

    Hi 

    I'm having some troubles with the Facebook Like button. It shows just fine on the page, but when clicking the Like-button it outputs umbraco tags on my Facebook wall.

    I'm using following XFBML script:

    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
    <fb:like show_faces="true" width="450" colorscheme="dark"></fb:like>

    The umbraco tags shows up like this:

    BTW: I don't have a <form runat="server" /> in my template

    Any hints ?

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Mar 03, 2011 @ 12:34
    Chriztian Steinmeier
    1

    Hi Anders,

    If that's inside an XSLT file you're probably suffering from "self-closing empty tags" - to fix, you can add some dummy comments inside the empty elements, like this:

    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"><xsl:comment /></script>
    
    <fb:like show_faces="true" width="450" colorscheme="dark"><xsl:comment /></fb:like>

    (You can also set <xsl:output method="html" /> but depending on the rest of your code, that'll likely open another can of worms to squash...)

    /Chriztian 

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Mar 03, 2011 @ 13:01
    Lee Kelleher
    0

    Curious if you've ran into any namespace issues with the "fb" prefix?

    I tried to add a Facebook Like Box in XSLT recently - run into a world of headaches ... ended up wrapping it in <xsl:text> tags. :-(

  • Anders Dahl Tollestrup 73 posts 52 karma points
    Mar 03, 2011 @ 13:05
    Anders Dahl Tollestrup
    0

    Thanx, Chriztian.

    My code was in the template, but adding a <!-- --> solved the issue ;-)

  • GLindqvist 13 posts 13 karma points
    May 11, 2011 @ 17:24
    GLindqvist
    0

    Lee Kellher: Make sure to add the namespace to the xslt.

    xmlns:fb="urn:facebook.com:xslt"

    That help me with the fb prefix.

Please Sign in or register to post replies

Write your reply to:

Draft