是的,终于得到了恼人的框,从原来的 964 像素调整大小:
为了兼容性(希望它将来能得到修复,或者更好地记录下来)
我还是说
size:(width:600,height:500),
但后来我将宽度和高度分解为父对象的属性,所以最终使用:
size:(width:600,height:500),width:600,height:500, ...
现在它还可以使用您选择的 JavaScript 库来调整大小,也就是说,这里是一个 jQuery 调整大小的示例:
FB.ui({
method: 'fbml.dialog',
fbml: (
'<div style="width:480px;border:1px black solid;">A small JavaScript library that allows you to harness ' +
'the power of Facebook, bringing the user\'s identity, ' +
'social graph and distribution power to your site.</div>'
),
size: {width:640,height:480}, width:640, height:480
});
$(".FB_UI_Dialog").css('width', $(window).width()*0.8); // 80% of window width
// I'm also sure you could stack this call if you wanted to