Facebook OpenGraph Protocol?

I installed the official facebook wordpress plugin, it helps to automatically add the following lines of code to my page:

<meta property="http://ogp.me/ns#locale" content="en_US" />
<meta property="http://ogp.me/ns#site_name" content="XXX" />
<meta property="http://ogp.me/ns#type" content="article" />
<meta property="http://ogp.me/ns#title" content="Contact" />
<meta property="http://ogp.me/ns#url" content="http://XXX.com" />
<meta property="http://ogp.me/ns/fb#app_id" content="XXX" />

Now I want to add a LIKE BOX to my page,

Read More

http://developers.facebook.com/docs/reference/plugins/like-box/

When I choose ‘XFBML’ code, it showed:

“Add an XML namespace to the tag of your document. This is necessary for XFBML to work in earlier versions of Internet Explorer.”

<html xmlns:fb="http://ogp.me/ns/fb#">

My question is that do I still need to add this one line of code considering I already got the “meta property” added above? If I add this, would it conflict with “meta property”??

Also which versions of IE need that line of code?

Thanks!!

Related posts

Leave a Reply

1 comment

  1. <html xmlns:fb="http://ogp.me/ns/fb#">

    My question is that do I still need to add this one line of code considering I already got the “meta property” added above?

    You would still need that, because it has nothing to do with Open Graph meta elements (which just provide some info about the document for “outside” parties like Facebook’s scraper), but with how the browser treats “unknown” tags in your document (and <fb:like-box> is such an unknown tag, because it does not exist in HTML).

    If I add this, would it conflict with “meta property”??

    No, there is no potential for any sort of “conflict” here.

    Also which versions of IE need that line of code?

    I don’t know exactly, but I’d guess at least 6 & 7.

    If for some reason (CMS, whatever) you can not add this to the HTML element – then you can just use the HTML5 version of the plugin code instead – that uses just a normal DIV element, and that is not “unknown” to any browser. (Your document’s doctype does not have to be the HTML5 one for this to work.)