I am getting the following error:
Authentication failed. The user has canceled the authentication or the provider refused the connection.
Original error mess
Recently this occurred due to facebook graph API change, v2.2 is depreciate https://developers.facebook.com/docs/apps/changelog
So we need to change php facebook-sdk for facebook graph api latest version v2.8. you can download the sdk from https://github.com/facebook/php-graph-sdk
after replacing sdk you may need to add auto-load configurations for facebook sdk.