facebook autorization S_REQUEST["code"] returns nothing and SSL error 107
**I use  this code below.**  


         $app_id = my_app_id;	   
         $app_secret = my_app_secret;
    
         $canvas_page = my_canvas_page;
    
    
    
         $auth_url = "http://www.facebook.com/dialog/oauth?client_id=" 
                . $app_id . "&redirect_uri=" . urlencode($canvas_page) . "&scope=email,read_stream,publish_stream";
                  
    
         echo("<script> top.location.href='" . $auth_url . "'</script>");	
    	 
    	    	
         $code = $_REQUEST["code"];

         
         $file = "help.txt";
         $fh = fopen($file, "w+") or die("File ($file) does not exist!");

         fwrite($fh,  $code); 
	 fclose($fh);

**$_REQUEST["code"]  return empty and i have error 107 ( net::ERR_SSL_PROTOCOL_ERROR). But real url contain code value** 

(https://plazma-tambov.ru/advanced/fb/?code=AQB_w2iFHofA8rzlr9FGD0EmA_BtWVhMmAJgsWo-YTgakgJ-YXibkd1_634pYZZL8UDds9ZlRHtKiWunGz5-2oWfKsrxpaur75t2PFPY9INuqCAL5kBtJsS_Bt9Vf-2WvHkDBtLYgzhUSk3InuV8IU3V6dwu9upGvH6ETDMLBY124JJBM3VMO6EF0eCjZg4ZsNU#_=_) 
        
  **If     i add next code** 


        $token_url = "https://graph.facebook.com/oauth/access_token?"
           . "client_id=" . $app_id . "&redirect_uri=" . urlencode($canvas_page)
           . "&client_secret=" . $app_secret . "&code=" . $code;
    
         echo("<script> top.location.href='" . $token_url . "'</script>");

 the real url contain empty for code variable 

(https://graph.facebook.com/oauth/access_token?client_id=MY_APP_ID&redirect_uri=https%3A%2F%2Fplazma-tambov.ru%2Fadvanced%2Ffb%2F&client_secret=MY_APP_SECRET&code=)   
         

**Why S_REQUEST["code"] returns nothing ?**
        	
facebook autorization S_REQUEST["code"] returns nothing and SSL error 107
===

**I use  this code below.**  


         $app_id = my_app_id;	   
         $app_secret = my_app_secret;
    
         $canvas_page = my_canvas_page;
    
    
    
         $auth_url = "http://www.facebook.com/dialog/oauth?client_id=" 
                . $app_id . "&redirect_uri=" . urlencode($canvas_page) . "&scope=email,read_stream,publish_stream";
                  
    
         echo("<script> top.location.href='" . $auth_url . "'</script>");	
    	 
    	    	
         $code = $_REQUEST["code"];

         
         $file = "help.txt";
         $fh = fopen($file, "w+") or die("File ($file) does not exist!");

         fwrite($fh,  $code); 
	 fclose($fh);

**$_REQUEST["code"]  return empty and i have error 107 ( net::ERR_SSL_PROTOCOL_ERROR). But real url contain code value** 

(https://plazma-tambov.ru/advanced/fb/?code=AQB_w2iFHofA8rzlr9FGD0EmA_BtWVhMmAJgsWo-YTgakgJ-YXibkd1_634pYZZL8UDds9ZlRHtKiWunGz5-2oWfKsrxpaur75t2PFPY9INuqCAL5kBtJsS_Bt9Vf-2WvHkDBtLYgzhUSk3InuV8IU3V6dwu9upGvH6ETDMLBY124JJBM3VMO6EF0eCjZg4ZsNU#_=_) 
        
  **If     i add next code** 


        $token_url = "https://graph.facebook.com/oauth/access_token?"
           . "client_id=" . $app_id . "&redirect_uri=" . urlencode($canvas_page)
           . "&client_secret=" . $app_secret . "&code=" . $code;
    
         echo("<script> top.location.href='" . $token_url . "'</script>");

 the real url contain empty for code variable 

(https://graph.facebook.com/oauth/access_token?client_id=MY_APP_ID&redirect_uri=https%3A%2F%2Fplazma-tambov.ru%2Fadvanced%2Ffb%2F&client_secret=MY_APP_SECRET&code=)   
         

**Why S_REQUEST["code"] returns nothing ?**
        	