You are here

public function TwitterAccount::setAuth in Twitter 8

Sets the authentication tokens to a user.

Parameters

array $values: Array with 'oauth_token' and 'oauth_token_secret' keys.

File

src/Plugin/Core/Entity/TwitterAccount.php, line 73

Class

TwitterAccount
Defines the twitter account entity class.

Namespace

Drupal\twitter\Plugin\Core\Entity

Code

public function setAuth(array $values) {
  $this->oauth_token = isset($values['oauth_token']) ? $values['oauth_token'] : NULL;
  $this->oauth_token_secret = isset($values['oauth_token_secret']) ? $values['oauth_token_secret'] : NULL;
}