Question

i am using HybridAuth for my sites login. it works with every thing but facebook. when i use "sign-in-with-facebook", it returens an error:

Authentication error!

Authentication failed. The user has canceled the authentication or the provider refused the connection.

Original error message: Authentication failed! Facebook returned an invalid user id.

i have disabled sandbox mode. can anyone help me to understand this, and what shoud i do for this?

i clicked the "sign-in-with-facebook" button after i log-out from facebook,
then it return error like below, insted of appearing facebook login-page.

Warning
The website directing you here was not a Facebook page. If you entered your Facebook login information on the previous site, you will need to reset your password.
Email:  
To learn more about staying safe on the internet, visit our Security Page. You can also check out the phishing Wikipedia article.
Was it helpful?

Solution

this was happend due to my hosting provider (free hosting provider) did not allow HybridAuth to communicate with facebook. but wen i moved to paid hosting, problem solved!.

hope this will help for someone.

OTHER TIPS

You need to find the base_facebook.php file in apps\third_party\hybridauth\Hybrid\thirdparty\Facebook folder if you are using codeigniter

Find this line : $response_params = parse_str($access_token_response, $response_params);

AND Replace it with : $response_params = json_decode($access_token_response, true);

Hope your code will work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top