title: Facebook invite friend request javascript
body: <p>I've a problem making an invite friends request via javascript on facebook app.
  My code is:</p>
  
  <pre><code>&lt;div id="fb-root"&gt;&lt;/div&gt;
      &lt;script&gt;
                  $(function() {
          FB.init({
              appId      : '&lt;?php echo APP_ID;?&gt;', // App ID
              status     : true, // check login status
              cookie     : true, // enable cookies to allow the server to access the session
              xfbml      : true,  // parse XFBML
              frictionlessRequests : true,
          });
          FB.Canvas.setAutoGrow();
                      function sendRequestViaMultiFriendSelector(){
                          FB.ui({method: 'apprequests',
                              message: 'My Great Request DONALD'
                          });
                      }
                  });
      &lt;/script&gt;
  </code></pre>
  
  <p>Naturally, I've imported js sdk via: </p>
  
  <pre><code>&lt;script src="http://connect.facebook.net/en_US/all.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>And I binded the button to invite friends with:</p>
  
  <pre><code>$('.step2').children('.tasto').click(function(){
      //sendRequestViaMultiFriendSelector();
      console.log("Gooby pls");
  });
  </code></pre>
  
  <p>In my page, the console make this error:</p>
  
  <pre><code>Unsafe JavaScript attempt to access frame with URL http://apps.facebook.com/termapp/ from frame with URL https://s-static.ak.facebook.com/connect/xd_arbiter.php?version=9#channel=f25e11b77&amp;origin=http%3A%2F%2Fwww.termapp.test&amp;channel_path=%2F%3Ffb_xd_fragment%23xd_sig%3Df3245a897%26. Domains, protocols and ports must match.
  </code></pre>
  
  <p>And naturally button doesn't work.</p>
  
  <p>I am on Chrome and my site is made in php with Zend.
  I cannot show you the app beacause I'm on a virtual host.</p>