General Question

polycinco's avatar

In need of quick help with HTML 5 code. Can't fix error of facebook like button.

Asked by polycinco (187points) January 28th, 2012

I am working on a webpage. I did everything on HTML5. I recently added the social media buttons and when I validate it, it shows me this error (this is for the facebook like button):

Line 628, Column 270: Element name fb:like cannot be represented as XML 1.0.
…?sk=wall” send=“false” width=“400” show_faces=“false” font=”” alt=””></fb:like>

Line 628, Column 270: Element fb:like not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
…?sk=wall” send=“false” width=“400” show_faces=“false” font=”” alt=””></fb:like>
Content model for element div:
Flow content.

What can I do to make this right?

Thank you!

Observing members: 0 Composing members: 0

6 Answers

Response moderated (Unhelpful)
Dog's avatar

I believe you are running into a common problem with HTML5 and the Facebook Markup Language.

This seems to be a common solution:
<script src=“http://connect.facebook.net/en_US/all.js#xfbml=1”></script>
<script type=“text/javascript”>
document.write(’<fb:like layout=“button_count” show_faces=“true” width=“100”></fb:like>’)
</script>

Source

polycinco's avatar

Thank you for your help, I tried that but now the button doesn’t appear at all?!

Dog's avatar

Hey did you check out the comments on my link? They went into other solutions. Hopefully it will help.

Vincentt's avatar

Which validator did you use and where did you get the buttons from? It seems odd that it’s trying to represent it as XML – as if it’s trying to validate XHTML.

tkrengel's avatar

You might have better luck if you ask your question at: https://developers.facebook.com/

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther