Facebook: SSL connection timeout

Today I am accessing facebook api to get insights of page, But I was getting “SSL connection timeout” error.In this tutorial I will described how to remove this error.

I was getting bellow error.

To remove error need to follow below steps.

Step 1: open base_facebook.php
Step 2: Find below array in above file.
public static $CURL_OPTS = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => 'facebook-php-3.2',
);

Step 3: Change CURLOPT_CONNECTTIMEOUT = 30 setting
public static $CURL_OPTS = array(
CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => 'facebook-php-3.2',
);