views:

17

answers:

1

Hello,

Im want to let the user to see the comments done to a topic without giving him the opportunity to enter a comment by his one! Is this possible with fxml? canpost="false" doesn't work for any reason...

Is this possible at all?

Thanks Markus

A: 

Well lets take a look at sources. If we open http://connect.facebook.net/en_US/all.js it has the following piece of code:

FB.subclass('XFBML.Comments', 'XFBML.IframeWidget', null, {
    _visibleAfter: 'resize',
    _refreshOnAuthChange: true,
    setupAndValidate: function () {
        var a = {
            channel_url: this.getChannelUrl(),
            css: this.getAttribute('css'),
            notify: this.getAttribute('notify'),
            numposts: this.getAttribute('num-posts', 10),
            quiet: this.getAttribute('quiet'),
            reverse: this.getAttribute('reverse'),
            simple: this.getAttribute('simple'),
            title: this.getAttribute('title', document.title),
            url: this.getAttribute('url', document.URL),
            width: this._getPxAttribute('width', 550),
            xid: this.getAttribute('xid')
        };
        ...

It is a list of parameters that are getting passed to actual widget iframe.

Bad news is that there is no such parameter as canpost anymore even though it is still listed in their docs (anyone surprised?), so it just getting ignored.

Good news is that css parameter could be still supported. In good old days they allowed you to pass custom css (in a form of absolute url, http://mysite.com/style.css), but I doubt it still works. Try to create your custom css style with comment box hidden (check comments iframe for required class name) and pass it. If that doesn't work then there is nothing else you can do I'm afraid.

serg

related questions