Several xml errors using Facebook JS SDK with xhtml strict
Posted
by
Landitus
on Stack Overflow
See other posts from Stack Overflow
or by Landitus
Published on 2011-02-09T23:22:58Z
Indexed on
2011/02/09
23:25 UTC
Read the original article
Hit count: 357
I'm trying to set up some like buttons to a project. These buttons live inside a jquery slideshow with Aino's Galleria and let you "Like" each different slide. I'm using an xHTML strict document and while in Firefox (and Firebug) everything seems ok, but in webkit inspector I get this:
XML self-closing tag syntax used on <fb:like>. The tag will not be closed.
[The HTML that caused this error was generated by a script.] XML self-closing tag syntax used on <fb:like>. The tag will not be closed.
I get one of these every slide, so there are 28 errors. Looking into it, found some seem to enclose the fb:like into something like this:
<script type="text/javascript">
//<![CDATA[
document.write('<fb:like href="<?php echo "http://www.site/image-".$image_id ;?>" width="260" height="80" show_faces="false" />');
//]]>
</script>
The above, still works in Firefox, but not in Safari. The inspector says:
26 XFBML tags failed to render in 30000ms.
Moreover, for the Facebook like buttons to work with the Galleria Jquery plugin, I have a custom function that reloads only the facebook like button concerning the actual slide which appears briefly upon loading the slide:
[...]
extend: function(options) {
// listen to when an image is shown
this.bind(Galleria.IMAGE, function(e) {
number = e.index + 1;
tag = $('.galleria-info-description .info-box-'+number).find('.btn_fb');
$(tag).each(function() {
FB.XFBML.parse( this );
});
});
}
This thing is getting more complex and really don't know who is causing the problem! Hope somebody can help or ask the right questions!
© Stack Overflow or respective owner