A recent update to the Facebook SDK has caused issues with some older versions which causes the following error:
PHP Fatal error: Cannot use object of type stdClass as array in FacebookRedirectLoginHelper.php on line 191
To fix this issue, go to FacebookRedirectLoginHelper.php then find $response['access_token']
You will see this code:
1 2 3 |
if (isset($response['access_token'])) { return new FacebookSession($response['access_token']); } |
Replace it with this:
1 2 3 |
if (isset($response->access_token)) { return new FacebookSession($response->access_token); } |