I encountered the same error earlier (now resolved). The error I made was calling the Facebook API using the old ie method
$appid = 'xxx'; $secret = 'xxxxxxxx'; $fb = new Facebook($appid, $secret); $user = $fb->getUser();
Here the $ fb instance itself was wrong. I checked it by installing
if ($appid == $fb->geAppId())
TO FIX IT Uses New API Method
$appid = 'xxxxxxxx'; // your APP ID $appsecret = 'xxxxxxxxxx'; // your APP sceret. $config = array( 'appId'=> $appid, // IMP: note that it is 'appId' and not 'appid'. 'secret' => $appsecret ); $fb = new Facebook($config); printf("<br/> FaceBook AppId Test : %s",(($fb->getAppId() == $appid)?"PASSED":"FAILED")); printf("<br/> FaceBook Secret Test : %s",(($fb->getApiSecret() == $appsecret)?"PASSED":"FAILED"));
The above two printfs are for testing purposes only if the $ fb file itself was created correctly or not. You might want to remove them in your application.
source share