I know this is an old question and the OP might have already found the solution. I also bumped into the same issue while working with the Laravel Socialite plugin.
For posterity, I would like to post the solution here. The issue is explained in this question: the domain graph.facebook.com resolves to an IPV6 address which some networks may not be configured to route. You can request cURL to resolve IP addresses to their IPV4 values. Set the option CURLOPT_IPRESOLVE
to CURL_IPRESOLVE_V4
.
In the case of the socialite plugin, we had to modify the FacebookProvider.php
to include the additional option.
Edit
To be more specific, Socialite uses GuzzleHttp, and we need to pass this as a parameter to the GuzzleHttp Client method:
'curl' => [ CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4]