title: How do I close the popup after I post to facebook?
body: <p>On our blog we have a link where users can post our articles to their timeline. A popup opens up and the user posts to facebook, then the popup stays there and redirects to "www.oursite.com". How do we instead close the popup when the user either finishes posting or clicks on the cancel button? According to <a href="https://stackoverflow.com/questions/8948020/fb-ui-feed-dialog-requires-redirect-uri-dialog-does-not-close">this so question</a> it can't be done but Huffington post has figured it out but looking at their code we can't figure it out. 
  As an example, <a href="http://www.huffingtonpost.com/2013/03/02/sequestration-2013_n_2796289.html" rel="nofollow noreferrer">the facebook share</a> button here will open up a popup and then close when you either post the article or cancel.</p>
  
  <p>Here's what we have:</p>
  
  <pre><code>FB.init({appId: "90210", status: true, cookie: true});
  
        function postToFeed() {
  
          // calling the API ...
          var obj = {
            method: 'feed',
            redirect_uri: 'http://www.oursite.com/',
            link: 'http://www.oursite.com/',
            picture: 'http://www.oursite.com/png.png',
            name: 'Some title',
            caption: '',
            description: ''
          };
  
          function callback(response){
             window.close(); // doesn't do anything
            //document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
          }
  
          FB.ui(obj, callback);
        }
  </code></pre>
  
  <p>We've tried adding window.close(); in the callback (and also self.close();), tried leaving redirect_uri blank (and tried leaving redirect_uri out altogether, but it's required).</p>