Facebook Login

28-Mar-2017 09:15:34

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?

28-Mar-2017 15:13:52

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']);

}

30-Mar-2017 02:00:36

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.