I am trying to add the Facebook API to my web application.
But when I tried to publish links using the Graph API, I got this error:
Fatal error: throw exception "Facebook \ FacebookSDKException" with the message "failed to connect to the host" in / home / u 614270703 / public_html / test / vendor / facebook / php-sdk-v4 / src / Facebook / HttpClients / FacebookCurlHttpClient.php: 156 Stack Trace: # 0 / home / u 614270703 / public_html / test / vendor / facebook / php-sdk-v4 / src / Facebook / FacebookRequest.php (248): Facebook \ HttpClients \ FacebookCurlHttpClient-> send (' https: / /graph.f ... ',' POST ', Array) # 1 / home / u614270703 / public_html / test / session2.php (32): Facebook \ FacebookRequest-> execute () # 2 {main} thrown in / home / u 614270703 / public_html / test / vendor / facebook / php-sdk-v4 / src / Facebook / HttpClients / FacebookCurlHttpClient.php on line 156
I do not know what's going on. What does this error mean? I do not know why I cannot connect to the host.
source share