public function TwitterAuthManager::getProfilePicture in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getProfilePicture()
- 8 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getProfilePicture()
- 8.2 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getProfilePicture()
- 8.3 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getProfilePicture()
- 8.4 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getProfilePicture()
- 8.5 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getProfilePicture()
- 8.7 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getProfilePicture()
- 8.8 modules/custom/social_auth_twitter/src/TwitterAuthManager.php \Drupal\social_auth_twitter\TwitterAuthManager::getProfilePicture()
Returns URL of a profile picture.
Return value
string|null Absolute URL to a picture or Null if picture is not set.
Overrides AuthManagerInterface::getProfilePicture
File
- modules/
custom/ social_auth_twitter/ src/ TwitterAuthManager.php, line 92
Class
- TwitterAuthManager
- Manages the authorization process before getting a long lived access token.
Namespace
Drupal\social_auth_twitterCode
public function getProfilePicture() {
if (($profile = $this
->getProfile()) && isset($profile->screen_name) && empty($profile->default_profile_image)) {
return "https://twitter.com/{$profile->screen_name}/profile_image?size=original";
}
}