The function argument of the FB.ui
method is a callback. It is called when the FB.ui
is done with what it is supposed to do (posting a wallpost here)
To get rid of the confirmation, you just need to get rid of the callback or letting it empty. However it is usually very important to know if the FB.ui
has succeeded in doing what it is supposed to do, for example to check if the user hasn't cancelled the action. That's why the callbacks are there. You can turn them into whatever you need though. In any case the dialog will be closed.
FB.ui({
method: 'feed',
name: 'Facebook Dialogs',
link: 'https://developers.facebook.com/docs/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple applications to users interface.'
},
function(response) {
if (response && response.post_id)
// Do whatever you need if the post is successfull
else
// Do whatever you need if the post failed
});
Hope that helped!