如何调整FB.ui流发布对话框的位置

use*_*406 0 javascript php facebook

我在facebook中使用FB.ui方法显示流发布框如下:

function showfeed()
{
   var publish = {
    method: 'stream.publish',
    attachment: {
        name: 'XYZ',
        caption: 'caption here',
        description: ('description'),
        href: 'url',
        media: [{
            type: 'image',
            href: 'url',
            src: 'xyz.gif'
        }]
    },
    action_links: [{ text: 'XYZ', href: 'url' }]
    };  

   FB.ui(publish,null);
}
Run Code Online (Sandbox Code Playgroud)

这样工作正常,但我的页面高度非常长,所以当我点击按钮显示此对话框时,它出现在页面的中心而不是顶部,所以即使对话框显示在中心,它也不会显示在我身上.是否有任何人可以看到它在顶部的位置对话框.

小智 8

将以下代码添加到<style>.[从其他论坛获得)希望有所帮助

div.fb_dialog_advanced+div.fb_dialog_advanced {
top:50px !important;
}
Run Code Online (Sandbox Code Playgroud)