title: FB friend-selector frame is in https and cannot interact with hosting page in http
body: <p>I have implemented an invite your friends feature on a site.<br>
  Lately it stopped working (Due to the continues pleasure of the "stable" Facebook graph API...)<br>
  I'm trying to wrap my head around this one with no luck.<br>
  I get the following error whenever I interact with the friend selector frame:</p>
  
  <blockquote>
    <p>Blocked a frame with origin "<a href="https://www.facebook.com" rel="nofollow">https://www.facebook.com</a>" from accessing
    a frame with origin "<a href="http://myDomain.com" rel="nofollow">http://myDomain.com</a>".  The frame requesting
    access has a protocol of "https", the frame being accessed has a
    protocol of "http". Protocols must match.</p>
  </blockquote>
  
  <p>my web-app is indeed on http rather then https, but this error is new as this feature worked in the past.</p>
  
  <p>this is the code I use to open the friend selector frame:</p>
  
  <pre><code>  function sendRequestViaMultiFriendSelector() {
      window.fbAsyncInit();
      FB._inCanvas = true;
  
      FB.getLoginStatus(function(response) {
          if (response.status === 'connected') {
          // the user is logged in and has authenticated your
          // app, and response.authResponse supplies
          // the user's ID, a valid access token, a signed
          // request, and the time the access token 
          // and signed request each expire
  
              FB.ui({method: 'apprequests',
                  message: 'my message to my friends goes here'
              }, function(response) {
                  console.log('requestCallback');
                  console.log('request: '+response.request);
                  console.log('to: '+response.to);
                  //write response values to DB goes here... 
              });
  
              var uid = response.authResponse.userID;
              var accessToken = response.authResponse.accessToken;
          } else {
              console.log('sendRequestViaMultiFriendSelector, not connected');
  
              FB.login(function(response) {
                  if (response.authResponse) {
                      console.log('starting again');
                      sendRequestViaMultiFriendSelector();
                  } else {
                      console.log('User cancelled login or did not fully authorize.');
                      on_fb_fail();//...
                  }
              }, {scope: "email,"+
                          "user_about_me,"+
                          "publish_stream"});
  
          }
      });
  } 
  </code></pre>
  
  <p>this is the code I use to init the FB api</p>
  
  <pre><code> console.log('&gt;&gt; window.environment: '+window.environment);
  window.fbAsyncInit = function() {
      console.log('window.fbAsyncInit, window.fb_inited: '+window.fb_inited);
      if(window.fb_inited === false){
      console.log('executing window.fbAsyncInit...');
      //if (navigator.appName.indexOf("Microsoft") != -1) {
      //if(/msie/gi.test(navigator.userAgent) ){
      if(navigator.appName === 'Microsoft Internet Explorer'){
          window.fb_inited = true;    
          FB.init({
              appId                : 'MY_APP_ID', // App ID
              status               : true, // check login status
              cookie               : true, // enable cookies to allow the server to access the session
              xfbml                : true,  // parse XFBML
              oauth                : true,
                      frictionlessRequests : true
          });
      } else {
          window.fb_inited = true;
          FB.init({
              appId                : 'MY_APP_ID', // App ID 
              channelUrl           : 'http://www.myDomain.com/channel.cfm', // Channel File
              status               : true, // check login status
              cookie               : true, // enable cookies to allow the server to access the session
              xfbml                : true,  // parse XFBML
              oauth                : true,
                      frictionlessRequests : true
          });
      }
      console.log('window.fb_inited: '+window.fb_inited);
  
      }
  // Additional initialization code here
  };
  
  (function(d, s, id){
      window.fb_inited = false;
      console.log('Loading FB JS-SDK asynchronously...');
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) {return;}
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js";
      fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));
  </code></pre>
  
  <p>this is my channel.cfm</p>
  
  <pre><code>&lt;cfsilent&gt;
      &lt;cfparam name="url.localeCode" default="en_US" /&gt;
      &lt;cfset cacheExpire = 60 * 60 * 24 * 365 /&gt;
      &lt;cfheader name="Pragma" value="public" /&gt;
      &lt;cfheader name="Cache-Control" value="maxage=#cacheExpire#" /&gt;
      &lt;cfheader name="Expires" value="#getHttpTimeString(dateAdd('d', now(), 365))#"&gt;
  &lt;/cfsilent&gt;
  &lt;cfoutput&gt;
      &lt;script src="//connect.facebook.net/#url.localeCode#/all.js"&gt;&lt;/script&gt;
  &lt;/cfoutput&gt;
  </code></pre>
  
  <p>this is a quick cf port from a channel.php which I tried as well...</p>
  
  <pre><code> &lt;?php
   $cache_expire = 60*60*24*365;
   header("Pragma: public");
   header("Cache-Control: max-age=".$cache_expire);
   header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$cache_expire) . ' GMT');
   ?&gt;
   &lt;script src="//connect.facebook.net/en_US/all.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>would REALLY appreciate any ideas
  I heared Facebook is not updating their reference in sync with their changes, hence the 'pleasure' in working with their API... 
  I based my scripts on these links:
  FB.init -  <a href="https://developers.facebook.com/docs/reference/javascript/" rel="nofollow">https://developers.facebook.com/docs/reference/javascript/</a>
  FB friends requests - <a href="https://developers.facebook.com/docs/reference/dialogs/requests/" rel="nofollow">https://developers.facebook.com/docs/reference/dialogs/requests/</a></p>