You are here

public function TwitterPostCollector::__construct in Social Feed 8

TwitterPostCollector constructor.

Parameters

string $consumerKey: $consumerKey.

string $consumerSecret: $consumerSecret.

string $accessToken: $accessToken.

string $accessTokenSecret: $accessTokenSecret.

\Abraham\TwitterOAuth\TwitterOAuth|null $twitter: Twitter OAuth Client.

File

src/Services/TwitterPostCollector.php, line 63

Class

TwitterPostCollector
Class TwitterPostCollector.

Namespace

Drupal\socialfeed\Services

Code

public function __construct($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret, TwitterOAuth $twitter = NULL) {
  $this->consumerKey = $consumerKey;
  $this->consumerSecret = $consumerSecret;
  $this->accessToken = $accessToken;
  $this->accessTokenSecret = $accessTokenSecret;
  $this->twitter = $twitter;
  $this
    ->setTwitterClient();
}