You are here

public function InstagramPostCollector::setInstagramClient in Social Feed 8

Set the Instagram client.

Throws

\Exception

1 call to InstagramPostCollector::setInstagramClient()
InstagramPostCollector::__construct in src/Services/InstagramPostCollector.php
InstagramPostCollector constructor.

File

src/Services/InstagramPostCollector.php, line 79

Class

InstagramPostCollector
Class InstagramPostCollector.

Namespace

Drupal\socialfeed\Services

Code

public function setInstagramClient() {
  if (NULL === $this->instagram) {
    $this->instagram = new InstagramBasicDisplay([
      'appId' => $this->apiKey,
      'appSecret' => $this->apiSecret,
      'redirectUri' => $this->redirectUri,
    ]);
    $this->instagram
      ->setAccessToken($this->accessToken);
  }
}