public function FacebookAuthManager::getAuthorizationUrl in Social Auth Facebook 3.x
Same name and namespace in other branches
- 8.2 src/FacebookAuthManager.php \Drupal\social_auth_facebook\FacebookAuthManager::getAuthorizationUrl()
Returns the authorization URL where user will be redirected.
Return value
string|mixed Absolute authorization URL.
Overrides OAuth2ManagerInterface::getAuthorizationUrl
File
- src/
FacebookAuthManager.php, line 81
Class
- FacebookAuthManager
- Contains all the logic for Facebook OAuth2 authentication.
Namespace
Drupal\social_auth_facebookCode
public function getAuthorizationUrl() {
$scopes = [
'email',
'public_profile',
];
$extra_scopes = $this
->getScopes();
if ($extra_scopes) {
$scopes = array_merge($scopes, explode(',', $extra_scopes));
}
// Returns the URL where user will be redirected.
return $this->client
->getAuthorizationUrl([
'scope' => $scopes,
]);
}