Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook SDK error: uncaught curlexception: 28: connect() timed out! thrown in php

Tags:

php

facebook

sdk

I just follow same code from Facebook SDK example.

If FB App point to my local desktop, it will get Facebook uid and user basic information (ex email) if APP get permission from OAUTH request.

But when I upload files to server, executing $facebook->api('/me');

Fatal error: Uncaught CurlException: 28: connect() timed out! thrown in /xxx/src/facebook.php on line 622

I still can't figure out why. It comes from CURL or SSL setting? My remote server support SSL and CURL is enabled. My local is only CURL but no SSL support.

I think my Facebook SDK is old version, only facebook.php without base_facebook.php. I try to use new version but can't run any program because crt error.

like image 985
user315396 Avatar asked Nov 05 '22 21:11

user315396


1 Answers

You get this error because your host cannot access the Facebook API. It might have an old version of Open SSL, can you check the current version on the server?

Try to connect using SSL from your local setup as well as it might be easier to debug on your local machine.

Also, see about that crt (CRC?) error and try to fix that first (don't shave too many Yak's though).

like image 185
Pål Brattberg Avatar answered Nov 09 '22 07:11

Pål Brattberg