After authorizing my app, I’m redirecting the user to my php-script:
require 'facebook.php';
$facebook = new Facebook(array(
'appId' => 'XXX',
'secret' => 'XXX',
));
$user = $facebook->getUser();
$fbUser = $facebook->api('/me');
The getUser()-Function properly returns my Facebook-UserID, but as soon as I am trying to fetch further information with $facebook->api(‘/me’), the following error-message is returned:
Uncaught CurlException: 7: couldn’t connect to host thrown in /XXX/base_facebook.php on line 886
Strange thing is, that the exact same code has been working for months on the very same server?!
I have solved the problem!
The hoster has blocked the ports 80 and 443. After reactivating them, everything worked fine.