Welcome to WebmasterWorld Guest from 54.162.21.214

Forum Moderators: httpwebwitch & not2easy

Message Too Old, No Replies

Facebook, do i have to use XHTML

     
10:03 pm on Feb 26, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2002
posts:3196
votes: 12


ok, i've taken the plunge and decided to integrate my sites better with facebook.

first big glaring question though, i can add the open graph metatags to the head of one of my pages no problem...

however i notice on this page: [developers.facebook.com...]

they are adding an extra couple xml namespaces ... do i have to do this, and if i do, does this mean i'm going to have to convert my pages to xhtml, which i'd rather not as they are currently html5 and i'm happy with them.
6:16 pm on Feb 28, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 29, 2002
posts:980
votes: 0


You don't need to use xhtml to add opengraph metatags, you can add them to html5.

Your link is to an old version of the opengraph syntax. The old version didn't use xhtml either, they just used those namespace declarations as trigger text; and that trigger text is no longer required.

The Like Button page has a opengraph tags generator here (below the button generator):
[developers.facebook.com...]

<meta property="og:title" content="***" />
<meta property="og:type" content="***" />
<meta property="og:url" content="***" />
<meta property="og:image" content="***" />
<meta property="og:site_name" content="***" />
<meta property="fb:admins" content="***" />

And there's a linter for debugging here:
[developers.facebook.com...]

HTH