2016-09-13 4 views
0

Ich habe ein PHP Skript, die Anfragen an die Facebook API Graph mit dem Facebook SDK für PHP "bekommen" Anfragen machen.Facebook PHP SDK: Unbekannt SSL-Protokoll Fehler

Für ein paar Tage, mein Skript (50% der Zeit, oder mehr) ausfällt, habe ich diesen Fehler habe:

Unknown SSL protocol error in connection to graph.facebook.com:443

und ich weiß nicht, warum, weil:

  • Ich habe das Skript nicht geändert.
  • Ich habe nichts auf dem Server geändert.
  • Darüber hinaus läuft mein Skript auf 2 Servern und das Problem tritt bei beiden auf.

Hier sind die Details:

#0 /var/www/oie/vendor/facebook/php-sdk-v4/src/Facebook/FacebookClient.php(216): Facebook\HttpClients\FacebookCurlHttpClient->send(' https://graph.f ...', 'GET', '', Array, 60) #1 /var/www/oie/vendor/facebook/php-sdk-v4/src/Facebook/Facebook.php(469): Facebook\FacebookClient->sendRequest(Object(Facebook\FacebookRequest)) #2 /var/www/oie/vendor/facebook/php-sdk-v4/src/Facebook/Facebook.php(342): Facebook\Facebook->sendRequest('GET', '273607869342343...', Array, NULL, NULL, NULL) #3 /var/www/oie/src/AppBundle/Controller/APIGraphController.php(239): Facebook\Facebook->get('273607869342343...') #4 [internal function]: AppBundle\Controller\APIGraphController->importAction(Object(Symfony\Component\HttpFoundation\Request)) #5 /var/www/oie/var/bootstrap.php.cache(3042): call_user_func_array(Array, Array) #6 /var/www/oie/var/bootstrap.php.cache(2997): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #7 /var/www/oie/var/bootstrap.php.cache(2337): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /var/www/oie/web/app.php(18): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #9 {main}

Was ist das Problem?

Antwort

1

Ich habe gleiche Problem (SSL-Protokollfehler) mit https://packagist.org/packages/facebook/graph-sdk#4.0.23

aufgegeben FYI

die Probleme mit SSL-Zertifikat und cURL Verhandlung

ich mit dieser Änderung gelöst haben

innerhalb vendor/facebook/graph-sdk/src/Facebook/HttpClients/FacebookCurlHttpClient.php oder vendor/facebook/php-sdk-v4/src/Facebook/HttpClients/FacebookCurlHttpClient.php

Suche public function openConnection Funktion und Anordnung innerhalb Optionen

  • CURLOPT_SSLVERSION => 6

hinzufügen und

  • CURLOPT_SSL_VERIFYPEER => false
+0

Danke ändern, scheint es zu funktionieren. – Marin74