public function FacebookAuthManager::authenticate in Social Auth Facebook 8.2
Same name and namespace in other branches
- 8 src/FacebookAuthManager.php \Drupal\social_auth_facebook\FacebookAuthManager::authenticate()
- 3.x src/FacebookAuthManager.php \Drupal\social_auth_facebook\FacebookAuthManager::authenticate()
File
- src/
FacebookAuthManager.php, line 37
Class
- FacebookAuthManager
- Contains all the logic for Facebook OAuth2 authentication.
Namespace
Drupal\social_auth_facebookCode
public function authenticate() {
try {
$this
->setAccessToken($this->client
->getLongLivedAccessToken($this->client
->getAccessToken('authorization_code', [
'code' => $_GET['code'],
])));
} catch (\Exception $e) {
$this->loggerFactory
->get('social_auth_facebook')
->error('There was an error during authentication. Exception: ' . $e
->getMessage());
}
}