The workaround if you are using JQuery is to append that iframe after the DOM is fully loaded. Here is a sample code how we're doing this:
$(document).ready(function(){
$('.facebookLike').after('<iframe src="your-url-goes-here" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:400px; height: 70px;"></iframe>');
});
You must have an element with defined class right after which the JQuery will append the iframe. It could be a simple <span class="facebookLike"></span>.
Also the above javascript code must be within included javascript file and not directly in the HEAD tag.
Here is a link with validated page using this workaround:
Comments - Validating XHTML with RDFa and Facebook like button
Add Comment
Fill out the form below to add your own comments.Tagged as: facebook, validate, rdfa, iframe, javascript, jquery, workaround, developer