FB.Dialog

From Facebook Developer Wiki (FbDevWiki.com)
Jump to: navigation, search

There appears to be no mention of this method in the official documentation, so I assume it's because FB.ui is intended to replace it. However, FB.ui({method:"fbml.dialog" ...}) parses the content as FBML which adds an additional step of processing.

Example:

var message = "Hi. This is some message.";
var dialog = FB.Dialog.create({
    content: '<div style="color: rgb(255, 255, 255); background-color: rgb(109, 132, 180); font-size: 15px; font-weight: bold; padding: 5px; text-align: left;">Error</div><p style="margin:10px 15px;">' + message + '</p><div style="color: rgb(0, 0, 0); background-color: rgb(242, 242, 242); padding: 8px; text-align: right; border-top: 1px solid rgb(198, 198, 198);height:23px;"></div>',
    closeIcon: true,
    onClose: function() {
        FB.Dialog.remove(dialog);
    },
    visible: true
});
dialog.style.width='450px';
dialog.style.height='95px';
Personal tools
Namespaces
Variants
Actions
Navigation
Graph API
FQL
Toolbox