title: Failed to connect to graph.facebook.com port 443: Network unreachable
body: <pre><code>&lt;?php
  session_start();
  
  //included file and use
  
  $app_id = 'xxx';
  $app_secret = 'xxx';
  FacebookSession::setDefaultApplication($app_id, $app_secret);
  $helper = new FacebookRedirectLoginHelper("`http://example/facebook4.0`/", $app_id, $app_secret);
  try 
  {
      $session = $helper-&gt;getSessionFromRedirect();
  }
  catch(FacebookRequestException $ex) { } 
  catch(Exception $ex) { }
  
  $loggedIn = false;
  
  if (isset($session))
  {
      if ($session) 
          {
              $loggedIn = true;
              try {                     //logged here and get data
                  $user_profile = (new FacebookRequest(
                  $session, 'GET', '/me'
                  ))-&gt;execute()-&gt;getGraphObject(GraphUser::className());
  
                 print_r($user_profile); //print data
  
              } 
              catch(FacebookRequestException $e)  {
                  echo "Exception occured, code: " . $e-&gt;getCode();
                  echo " with message: " . $e-&gt;getMessage();
              }   
          }
  }
  
  if(!$loggedIn)  //if user is not online // get link and add scope
  {
      $loginUrl = $helper-&gt;getLoginUrl(array('public_profile','email'));
      echo "&lt;a href='$loginUrl'&gt;Login With Facebook&lt;/a&gt;";
  }
  else
  {
      print_r($user_profile); //logout link is generated here 
      echo '&lt;br&gt;&lt;br&gt;&lt;a href="index.php"&gt;Logout&lt;/a&gt;'; //print to sceen
  }
  
  ?&gt;
  </code></pre>
  
  <p>I have set Domain name to localhost and Site URL to <code>http://localhost/</code>. 
  I have also tried <code>http://localhost:80</code> , <code>http://mydomainname:80</code> (changing hosts)</p>
  
  <p>this is error I get in response:</p>
  
  <pre><code>Facebook\FacebookSDKException Object
  (
      [message:protected] =&gt; Failed to connect to graph.facebook.com port 443: Network unreachable
      [string:Exception:private] =&gt; 
      [code:protected] =&gt; 7
      [file:protected] =&gt; C:\xampp\htdocs\myapp\Facebook\HttpClients\FacebookCurlHttpClient.php
      [line:protected] =&gt; 142
      [trace:Exception:private] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [file] =&gt; C:\xampp\htdocs\myapp\Facebook\FacebookRequest.php
                      [line] =&gt; 248
                      [function] =&gt; send
                      [class] =&gt; Facebook\HttpClients\FacebookCurlHttpClient
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                              [0] =&gt; https://graph.facebook.com/v2.0/oauth/access_token?client_id='my key'&amp;redirect_uri=http%3A%2F%2Flocalhost%3A80%2Fmyapp%2F&amp;client_secret='mykey_secert'&amp;code=AQCYmzsFNUIQG7gUAZ3y-YJHLeIGcF-xyqHotx31MCJGlm16fV9VbVSzlGlx5280-u0Ho3jFjg_REevN5J0LEIPHerY1QaaBYjpkkoIMf6PCwHGj2OIrQDvfyGcUJRK4cJP0YQ8H8HdYw86xEhlcdJHvnObkCU6tSBcVbDWM8uoXJlRqNl6o-IdxoSfbk6IjuCreyagMXvam4vgV0HKxn0nkWaV26k1P6kQP_L1LtXXx2UyUQ1i0jJGL9JiGr1gsUbf5drY_URIrEWzawumpnSWkuxln8hiOtAr_xwM_4cBZwxf3_pWq8YnUotpmzzM5sPhW_ERMYWAdovjZPHu7Xdgs&amp;access_token=329734847193179%7Cd9e5cdb2d0c3cbe1e127827762e94284&amp;appsecret_proof='key_proof'
                              [1] =&gt; GET
                              [2] =&gt; Array
                                  (
                                  )    
                          )    
                  )
  
              [1] =&gt; Array
                  (
                      [file] =&gt; C:\xampp\htdocs\myapp\Facebook\FacebookRedirectLoginHelper.php
                      [line] =&gt; 146
                      [function] =&gt; execute
                      [class] =&gt; Facebook\FacebookRequest
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                          )    
                  )
  
              [2] =&gt; Array
                  (
                      [file] =&gt; C:\xampp\htdocs\myapp\index.php
                      [line] =&gt; 52
                      [function] =&gt; getSessionFromRedirect
                      [class] =&gt; Facebook\FacebookRedirectLoginHelper
                      [type] =&gt; -&gt;
                      [args] =&gt; Array
                          (
                          )    
                  )    
          )    
      [previous:Exception:private] =&gt; 
  )
  </code></pre>