Facebook login dont works on concrete5-8.0.2
Permalink
Hello,
In concrete5-8.0.2 (same in concrete5.7) facebook login dont works it give error "An unexpected error occurred."
I tried to find in the code but it seems like it is facing issue in getting email addresss from the result returned by facebook (email scope is already taken in fb permission still)... Can anyone pls help why this issue is occuring
In concrete5-8.0.2 (same in concrete5.7) facebook login dont works it give error "An unexpected error occurred."
I tried to find in the code but it seems like it is facing issue in getting email addresss from the result returned by facebook (email scope is already taken in fb permission still)... Can anyone pls help why this issue is occuring
Hello everyone,
Finally, i found fb login issue solution sharing here.
I was using facebook 5.8 and still found fb login issue. I found one issue which is related to token read of facebook and other issue the url as posted by @micrdy .
Below is 2 changes which i did after that fb login started working for me
1. concrete5-8.1.0\concrete\vendor\lusitanian\oauth\src\OAuth\OAuth2\Service\Facebook.php
IN FUNCTION parseAccessTokenResponse($responseBody)
replace
parse_str($responseBody, $data);
With
$data=json_decode($responseBody,true);
2. concrete5-8.1.0\concrete\vendor\oryzone\oauth-user-data\src\OAuth\UserData\Extractor\Facebook.php
Instead of
const REQUEST_PROFILE = '/me';
go with:
const REQUEST_PROFILE = '/me?fields=name,email';
Finally, i found fb login issue solution sharing here.
I was using facebook 5.8 and still found fb login issue. I found one issue which is related to token read of facebook and other issue the url as posted by @micrdy .
Below is 2 changes which i did after that fb login started working for me
1. concrete5-8.1.0\concrete\vendor\lusitanian\oauth\src\OAuth\OAuth2\Service\Facebook.php
IN FUNCTION parseAccessTokenResponse($responseBody)
replace
parse_str($responseBody, $data);
With
$data=json_decode($responseBody,true);
2. concrete5-8.1.0\concrete\vendor\oryzone\oauth-user-data\src\OAuth\UserData\Extractor\Facebook.php
Instead of
const REQUEST_PROFILE = '/me';
go with:
const REQUEST_PROFILE = '/me?fields=name,email';
I recommend updating to the latest version of concrete5 v8 and see if you still get the error.
If you still receive the error after updating, temporarily enable debug error output to see if there is a more detailed error.
Dashboard > System & Settings > Environment > Debug Settings > Error Detail > Show the debug error output