Dear All
I'm using the Facebook Comments social plugin(http://
developers.facebook.com/docs/reference/plugins/comments/) on my site.
while there's no iframe code now, I'm using the html5 code instead.
The code is as followed:

///////////////////////////////////////////////////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="Facebook Comment Box"
          description="Include Facebook Comment Box for the
Page(HTML5)"
          thumbnail="http://www.gstatic.com/sites-gadgets/common/
images/sites-icon-gadget-thumb.png"
          screenshot="http://www.gstatic.com/sites-gadgets/common/
images/sites-icon-gadget-ss.png"
          author="WeatherRisk">
        <Require feature="dynamic-height"/>
  </ModulePrefs>
  <UserPref name="content" display_name="URL to Content"
required="true"/>
  <Content type="html" view="default,canvas"><![CDATA[
  <div id="fb-root"></div>
  <div id="fbcomment" class="fb-comments" data-num-posts="5" data-
width="600"></div>
  <script>(function(d, s, id) {
        var prefs = new gadgets.Prefs();
        var content = prefs.getString('content');

        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/zh_TW/all.js#xfbml=1";
        fjs.parentNode.insertBefore(js, fjs);

        var fbcomment = document.getElementById('fbcomment');
        fbcomment.setAttribute('frameborder','no');
        fbcomment.setAttribute('data-href', content);
        gadgets.window.adjustHeight();
  }(document, 'script', 'facebook-jssdk'));</script>
]]></Content>
</Module>
///////////////////////////////////////////////////////////////////////////////////

It works fine, but the only question that I have is to dynamically
changing the height of the gadget.
I used the      <Require feature="dynamic-height"/> and
gadgets.window.adjustHeight() already, but it doesn't work.
I would like the gadget to show all the comments without the scroll
bar.
Does anybody know how to solve this?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/Google-Gadgets-API?hl=en.

Reply via email to