I have this problem in the script:
Fatal error: Cannot use object of type stdClass as array in /home/usercolecionador/public_html/oauth/auth/platforms/facebook-app/Facebook/FacebookRedirectLoginHelper.php on line 147
This script was working fine until 17/3/26.
The logins of Twitter and Google work perfectly, only the Facebook login presents this error, can anyone help me?
change this:
$response = (new FacebookRequest(
FacebookSession::newAppSession($this->appId, $this->appSecret),
'GET',
'/oauth/access_token',
$params
))->execute()->getResponse();
if (isset($response['access_token'])) {
return new FacebookSession($response['access_token']);
}
for this:
$response = (new FacebookRequest(
FacebookSession::newAppSession($this->appId, $this->appSecret),
'GET',
'/oauth/access_token',
$params
))->execute()->getResponse();
$array = (array)$response; // convert to array
if (isset($array['access_token'])) {
return new FacebookSession($array['access_token']);
}
Hi,
Have you fixed your issue?
I am going to update the new Facebook SDK and try to release in this week. So if you still have issues you can wait a new update and try again.
Regards.