You are here

public function TwitterAuthManager::setSdk in Open Social 8.5

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::setSdk()
  2. 8 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::setSdk()
  3. 8.2 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::setSdk()
  4. 8.3 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::setSdk()
  5. 8.4 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::setSdk()
  6. 8.6 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::setSdk()
  7. 8.7 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::setSdk()
  8. 8.8 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::setSdk()

Set instance of SDK.

Parameters

object $sdk: SDK instance.

Return value

mixed Returns mixed.

Overrides AuthManagerInterface::setSdk

File

modules/custom/social_auth_twitter/src/TwitterAuthManager.php, line 26

Class

TwitterAuthManager
Manages the authorization process before getting a long lived access token.

Namespace

Drupal\social_auth_twitter

Code

public function setSdk($sdk) {
  if (!$sdk instanceof TwitterOAuth) {
    throw new InvalidArgumentException('SDK object should be instance of \\Abraham\\TwitterOAuth\\TwitterOAuth class');
  }
  $this->sdk = $sdk;
}