Facebook fql SSL connection timeout

I use facebook api to get a backup of facebook photos using access_token and fql.

Using fql, I got a list of user albums

$client = new Facebook(array('appId' => 'xxxx', 'secret' => 'xxxxxx')); $fql_albums = "SELECT aid,name from album where owner=$user_Id"; $albumId = $client->api(array( 'method' => 'fql.query', 'access_token' => $user_access_token, 'query' => $fql_albums, )); 

After receiving this list, I run a query to get all the photos in the album, and then download this album and then go to the next album.

It only downloads 2 albums and then gets an error as shown below

(!) Fatal error: Uncaught CurlException: 28: SSL connection timeout thrown D: \ WAMP \ WWW \ FrostBox1.0 \ Facebook \ FaceBookConnect \ facebook-PHP-SDK \ SRC \ base_facebook.php on line 759

What can i do wrong?

+6
source share
3 answers
  • open base_facebook.php
  • find CURLOPT_CONNECTTIMEOUT => 10
  • change it to CURLOPT_CONNECTTIMEOUT => 30

What is it!

+16
source

For me, the solution was to add

 $opts[CURLOPT_SSLVERSION] = 3; 

before

 curl_setopt_array($ch, $opts); 

in base_facebook.php

Thanks: https://developers.facebook.com/bugs/213367445404472/?browse=search_4eeccca164bbe6357503363

+18
source

I solved this by adding:

 CURLOPT_SSLVERSION => 3, 

after the line:

 CURLOPT_USERAGENT => 'facebook-php-3.1', 

at - base_facebook.php

(he will make curl to use SSLv3 )

0
source

Source: https://habr.com/ru/post/890230/


All Articles