Shubo
Shubo

Reputation: 267

Adding CSS to Facebook Like Box

I'm trying to add css styling to Facebook Like Box XFBML file but it doesn't take the stylesheet the regular way – its own stylesheet comes after yours. So I did some search and found posts that said to add css="youstylesheetlink.css" to the fb:like-box like this:

<fb:like-box href="https://www.facebook.com/example" width="496" height="120" show_faces="true" border_color="" stream="false" header="false" css="http://example.com/css/style.css?2"></fb:like-box>

But no matter what I try it doesn't take the stylesheet. Can anybody guide me how I can achieve this?

Thank you.

Upvotes: 3

Views: 5672

Answers (3)

Sparky
Sparky

Reputation: 98738

If you could do it, it would be documented here.

IMHO, you cannot tinker with Facebook's corporate branding... they want a consistent user experience everywhere on the Internet, otherwise, you'll have people not trusting things that look like homemade "like" boxes.

Also see this...

Embedded Facebook Like-Box won't let me style it. Why?

Upvotes: 2

bkaid
bkaid

Reputation: 52083

Facebook used to allow you to pass custom css to their like box, and that is why you see examples of it happening. But they stopped allowing you to do this for now.

Upvotes: 3

alex
alex

Reputation: 490461

Unless your website happens to have the same matching protocol, domain and port as the Facebook iframe, you can not modify it because of Same Origin Policy.

Upvotes: 2

Related Questions