title: Facebook login Failed connect to graph.facebook.com:443; Operation now in progress
body: <p>I am trying to implement facebook login, im having the following code.</p>
  
  <pre><code>$helper = new Facebook\FacebookRedirectLoginHelper(URL('facebook/login'), $apiVersion = NULL);
  try
  {
      $session = $helper-&gt;getSessionFromRedirect();
  } catch (Facebook\FacebookRequestException $ex)
  {
      // When Facebook returns an error
      return Redirect::to('login')-&gt;with('error-message', 'Facebook could not validate your account.');
  } catch (\Exception $ex)
  {
      // When validation fails or other local issues
      // FAIL HAPPENS HERE 
      return $ex-&gt;getMessage();
  }
  </code></pre>
  
  <p>But i get </p>
  
  <pre><code>Facebook login Failed connect to graph.facebook.com:443; Operation now in progress
  </code></pre>
  
  <p>As suggested by <a href="https://stackoverflow.com/questions/25131564/failed-to-connect-to-graph-facebook-com-port-443-network-unreachable">Failed to connect to graph.facebook.com port 443: Network unreachable</a> I tryed</p>
  
  <pre><code>  $data = file_get_contents('https://graph.facebook.com/4'); print_r( $data );
  </code></pre>
  
  <p>This results in a page that looks to fail in loading,
  As also suggested i tryed </p>
  
  <pre><code>$ch = curl_init("https://google.com"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $data = curl_exec($ch); print($data);
  </code></pre>
  
  <p>this resulted in google being loaded in my page.</p>
  
  <p>unfortunately there is not given a solution, so hopefully someone else can help me out .</p>
  
  <p>// Im on a shared hosting, i cant change php.ini files</p>