protected function Twitter::fetchTweet in Media entity Twitter 8
Get a single tweet.
Parameters
int $id: The tweet id.
1 call to Twitter::fetchTweet()
- Twitter::getField in src/
Plugin/ MediaEntity/ Type/ Twitter.php - Gets a media-related field/value.
File
- src/
Plugin/ MediaEntity/ Type/ Twitter.php, line 457
Class
- Provides media type plugin for Twitter.
Namespace
Drupal\media_entity_twitter\Plugin\MediaEntity\TypeCode
protected function fetchTweet($id) {
$this->tweetFetcher
->setCredentials($this->configuration['consumer_key'], $this->configuration['consumer_secret'], $this->configuration['oauth_access_token'], $this->configuration['oauth_access_token_secret']);
try {
return $this->tweetFetcher
->fetchTweet($id);
} catch (\Exception $e) {
throw new MediaTypeException(NULL, $e
->getMessage());
}
}