title: Display message when JavaScript function works
body: <p>I want to display a message when this function works : </p>
  
  <pre><code>  function testAPI() {
      FB.login(function(){
      FB.api('/me/feed', 'post', {message: 'Hello World'});
      }, {scope: 'publish_actions'});
  </code></pre>
  
  <p>My attempt was this and it didn't work : </p>
  
  <pre><code>  function testAPI() {
     FB.login(function(response){
      FB.api('/me/feed', 'post', {message: 'Hello World'});
      }, {scope: 'publish_actions'},{complete(response);});
    }
  </code></pre>
  
  <p>I'm getting this error : </p>
  
  <blockquote>
    <p>Uncaught SyntaxError: Unexpected token var</p>
  </blockquote>
  
  <p>How can I make this work? Thanks.</p>