Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Use OBJECT to add a Facebook Like Box?

Doesn't work in IE {sigh}

8:06 am on Feb 2, 2011 (gmt 0)

New User

10+ Year Member

joined:Aug 21, 2003
posts: 4
votes: 0

A friend wants to add a Facebook "Like Box" to her blog on an external site, so I have no control over the META tags or their other restrictions, which include no usage of IFRAME or JavaScript.

The code that comes directly from Facebook is as follows:

style="border:none; overflow:hidden; width:292px; height:62px;"

My idea was to replace IFRAME with OBJECT as follows:

style="border:none; height:62px; overflow:hidden; width:292px;">

Firefox shows the box.
Chrome brings it home.
Explorer starts the horror....

For whatever reason, it's just blank in IE, where the box should be. I'm still stuck after a week of trying every conceivable tweak. I added a link to her profile with "fallback" code, but I was really hoping to avoid that road. Ideas? Anyone? Bueller? Anyone?
9:39 am on Feb 2, 2011 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 2, 2003
posts: 986
votes: 30

Hi there donfox,

have you tried adding type="text/html" as an attribute to the object tag?

5:07 am on Feb 3, 2011 (gmt 0)

New User

10+ Year Member

joined:Aug 21, 2003
posts: 4
votes: 0

Thanks, birdbrain; I did try that, but with the same results: Fine in FF and Chrome, blank in IE. I even tried type="application/x-shockwave-flash"

No, I'm not proud of that, but if it had worked, who's to know? It's not one of my sites, so I don't care how ugly or invalid the code is. XD
9:25 am on Feb 4, 2011 (gmt 0)

New User

5+ Year Member

joined:Oct 20, 2010
votes: 0

HTML dtd will not accept this kind of code <embed.....
How to check your html to xhtml -> validator.w3.org
You may use
<object data="fullpath of your media file">

instead of
<embed ....

[edited by: tedster at 4:26 pm (utc) on Feb 4, 2011]
[edit reason] removed signature link [/edit]

7:36 am on Feb 6, 2011 (gmt 0)

New User

10+ Year Member

joined:Aug 21, 2003
posts: 4
votes: 0

Mabuhay @ salamat jalicia,

The code doesn't need to be valid; she just wants to post a Facebook Like Box on her profile on a blog site. Neither of us owns the blog site, so it is the site owner's problem to worry about validation. ;)

We hoped the Like Box would work with at least the Big Three browsers, but without using IFRAME or JavaScript, because the site doesn't permit those. OBJECT seems to work fine in Firefox and Chrome but not Internet Explorer. We haven't checked Opera, Safari or others. :D

We would even be perfectly happy to use EMBED, which I did try but I couldn't figure out how to make it work with the Like Box either.