28-Apr-2009 (Tue)
Wherein I bow to the Facebook Hegemon and invite shitcockery.

Trying out something new: Facebook recently released Facebook Connect, which makes it relatively easy to add a "comments" box to any web page. The comments appear embedded in the page, but are actually stored on Facebook. So, I've added that to the blog, here. Click on the "Comments" link below to see them.

What do you think? Let me know how it works.

Also: I'd like the comments box to match the color scheme on this page, but I can't figure out how to do that. I'm passing the css= attribute to the fb:comments tag, but either it's not loading that CSS file at all, or I guessed wrong about what the class names are. Can anyone tell me what I'm doing wrong, or show me an example of a site that uses Facebook Connect and manages to change the color scheme of the embedded comment area?

18 Responses:

  1. Mike Castleman says:

    Facebook's demo has some CSS styling. You could also try the Web Developer Extension for Firefox in order to learn the names of various Facebook element classes.

  2. Mike Castleman says:

    and, um. it looks like it doesn't let me put HTML in my comments.

  3. Conrad Heiney says:

    facebook's own css spews so many errors in the console that it's hard to say what of theirs is loading at all. maybe they're *trying* to load yours and just failing?

  4. Anonymous User says:

    ick looks bad!

  5. Anonymous User says:

    Look at the frame source for this dropdown area. It is loading your CSS file but then it loads a bunch of other CSS files.

    I daresay this will come out looking pretty fucked but this part of the CSS crud:

    [...]

    <link type="text/css" rel="stylesheet" href="http://www.connect.facebook.com//fbml_static_get.php?src=http%3A%2F%2Fwww.dnalounge.com%2Fbackstage%2Fcomments.css&appid=72575175403&pv=1&sig=d32ad6872668a0b23a6a7e3b25a53e38&filetype=css" />

    <link type="text/css" rel="stylesheet" href="http://b.static.ak.fbcdn.net/rsrc.php/z8TXE/lpkg/dry57tpe/en_GB/141/160474/css/54hc4j4zc6g4ow0k.pkg.css" />
    [...]

  6. Jamie Zawinski says:

    Either it's not loading http://www.dnalounge.com/backstage/comments.css at all or it's ignoring it; I copied the CSS file that http://www.somethingtoputhere.com/commentdemo/gallery.php?picture=1 points at (http://www.somethingtoputhere.com/commentdemo/comments.css) and changed all the background colors to blue, yellow and red; there is no blue, yellow or red here.

  7. Carey Underwood says:

    .cbody { background: #FFF; } is the culprit.

  8. Anonymous User says:

    It's really weird to see you commenting with your facebook icon. I mean... it's a photo. Of YOU.

    And honestly, this looks not bad. CSS on widgets like this can be a nightmare.

  9. Edward Lang says:

    looks so much better know. the .cbody {} was the fix?

  10. Jeremy Wilson says:

    Does this mean we're friends now?

  11. scullin says:

    I got a cross-domain access error (Unsafe JavaScript attempt to access frame...), which I suspect you don't see because of the Referer header tweaking you do by default.

  12. Jamie Zawinski says:

    I changed the .cbody background to black, but that was in the "outside" HTML. My CSS changes still aren't affecting the "inside" HTML that Facebook is producing, so, for example, it's resulting in black-on-black text. If my CSS was being loaded there'd be horrid yellow backgrounds and red boxes around everything.

  13. Jamie Zawinski says:

    Also I don't seem to get notifications (via email or anything else) when people post new comments.

    If there's no way for new comments to be mailed to me, this is useless and I'll just turn it off.

  14. artkiver says:

    Damn with the shitcockery I was hoping the snark-o-tron would be accessible again.

  15. Edward Lang says:

    Have a look at the bottom of http://www.facebook.com/editaccount.php?notifications (for your account). I see "DNA Lounge" in the Other Applications section, and radio buttons for enabling / disabling email notifications.

  16. Jamie Zawinski says:

    Checking "send email" on that DNA Lounge line there did not cause me to start getting email (either "real" email or "facebook inbox" email) when people post here.

  17. Anonymous User says:

    It matches DNAL colors - no icky reds/blues/yellows.

    I just logged into FB and reloaded the page.