title: Facebook JavaScript Send Dialog, callback function works incorrect
body: <p>I'm trying to execute callback function in FB.ui (send dialog). It called in same moment when loaded FB.ui but I want execute callback function after pressing 'send' or 'cancel' button. Is it realizable?</p>
  
  <pre><code>function callback(response) {
        alert('message was sent');
  }
  
  FB.ui({
                  method: 'send',
                  name: 'Dialog',
                  link: 'http://***.com',
                  redirect_uri: '****',
                  description: '***',
                  picture: '***',
                  to: userId
              },
                  callback(response)
              );
  </code></pre>