FB.ui and popup size setting

I use FB.ui when the display option is set to a popup.

When the method is "stream.publish", it automatically downloads the content. However, when you use "fbml.dialog" (to display a selector with several friends), it shows a size that I cannot change (and the content is cropped).

I 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, ... 

I also looked at the source code of the API, and it declares the method as follows:

Method Declaration:

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

Functions that perform methods:

 // 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 greatly appreciated ...

+4
source share
3 answers

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

http://pastebin.com/Qwu0bEed

+2
source

if you change it to

display: 'dialog'

it will resize correctly.

0
source

Use

 FB.UIServer.Methods["fbml.dialog"].size = {width:640, height:400}; 
0
source

Source: https://habr.com/ru/post/1311496/


All Articles