FB.ui is a generic helper method for triggering Dialogs which allow the user to take some action.
These dialogs include:
To invoke the Feed Dialog, use feed as the method, and optionally specify other properties as documented in the Feed Dialog documentation:
FB.ui(
{
method: 'feed',
name: 'Facebook Dialogs',
link: 'http://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| params | Object | The required arguments vary based on the method being used, but specifying the method itself is mandatory. Please find the full list of dialogs that can be used as values for method in the Dialogs documentation. If display is not specified, then iframe dialogs will be used when possible, and popups otherwise.
| ||||||||||||
| cb | Function | Callback function to handle the result. Not all methods may have a response. |