Showing popup in the new Facebook JavaScript SDK

前端 未结 9 1546
遥遥无期
遥遥无期 2020-12-30 17:15

I used to have an href in my website. When users clicked on it, a multi-friend selector showed so they could invite their friends to my website. That was done u

9条回答
  •  时光取名叫无心
    2020-12-30 17:40

    None of the previous answers were working for me. The workaround I found was to do the following:

    var uiSize = FB.UIServer.Methods["fbml.dialog"].size;
    FB.UIServer.Methods["fbml.dialog"].size = {width:760, height:450};
    
    FB.ui({
        method:'fbml.dialog',
        display: 'popup',                   
        fbml: message
    },
        function( response ){
            FB.UIServer.Methods["fbml.dialog"].size = uiSize;
        }
    );
    

提交回复
热议问题