public function LinkedInAuth::initSdk in Open Social 8.2
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::initSdk()
- 8 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::initSdk()
- 8.3 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::initSdk()
- 8.4 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::initSdk()
- 8.5 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::initSdk()
- 8.6 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::initSdk()
- 8.7 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::initSdk()
- 8.8 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::initSdk()
Returns an instance of sdk.
Return value
mixed Returns a new LinkedIn instance or FALSE if the config was incorrect.
Throws
\Drupal\social_api\SocialApiException
File
- modules/
custom/ social_auth_linkedin/ src/ Plugin/ Network/ LinkedInAuth.php, line 65
Class
- LinkedInAuth
- Defines a Network Plugin for Social Auth LinkedIn.
Namespace
Drupal\social_auth_linkedin\Plugin\NetworkCode
public function initSdk() {
$class_name = '\\Happyr\\LinkedIn\\LinkedIn';
if (!class_exists($class_name)) {
throw new SocialApiException(sprintf('The PHP SDK for LinkedIn could not be found. Class: %s.', $class_name));
}
if (!$this
->validateConfig($this->settings)) {
return FALSE;
}
return new $class_name($this->settings
->getClientId(), $this->settings
->getClientSecret());
}