FB.ui 和设置弹出窗口大小 [英] FB.ui and setting popup size

查看:23
本文介绍了FB.ui 和设置弹出窗口大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 FB.ui 并将显示参数设置为弹出.

I am using FB.ui with the display parameter set to popup.

当方法是stream.publish"时,它会在加载内容时自动调整大小.但是,当使用fbml.dialog"(为了显示多朋友选择器)时,它会显示我无法更改的大小(并且显示的内容会被裁剪).

When the method is 'stream.publish', it autoresizes when the content is loaded. However, when using 'fbml.dialog' (in order to display a multi-friend selector) it shows a size that I'm not able to change (and the content is displayed cropped).

我尝试了以下方法,但没有成功:

I have tried with the following approaches, with no luck:

FB.ui({
method: 'fbml.dialog',
size: {width: 800, height: 500},
...

FB.ui({
method: 'fbml.dialog',
width: 800,
height: 500,
...

我也一直在查看 API 源代码,它以这种方式声明方法:

Also I've been looking at the API source code, and it declares the method this way:

方法声明:

'fbml.dialog': {
    size : { width: 575, height: 300 },
    url : 'render_fbml.php',
    loggedOutIframe : true
}...

执行方法的函数:

// the basic call data
var call = {
  cb : cb,
  id : id,
  size : method.size || {},
  url : FB._domain.www + method.url,
  params : params
};

任何帮助将不胜感激......

Any help would be much appreciated...

推荐答案

在他们解决这个问题之前,我使用了一些 hacky 解决方法:

I've used a bit of a hacky workaround until they fix this:

http://pastebin.com/Qwu0bEed

这篇关于FB.ui 和设置弹出窗口大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆