FB.ui is a generic helper method for triggering Dialogs that access the Facebook Dialog API endpoint.
These include:
Prompting the user to authorize your application, or grant it permissions
Prompting the user to send an application request to a friend
To invoke the feed dialog, use the name of the dialog as the method and optionally specify other properties 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 | Optional callback function to handle the result. Not all methods may have a response. |