diff --git a/lib/Service/Social/TwitterProvider.php b/lib/Service/Social/TwitterProvider.php index 9460fb405..fc566acac 100644 --- a/lib/Service/Social/TwitterProvider.php +++ b/lib/Service/Social/TwitterProvider.php @@ -69,9 +69,9 @@ public function getImageUrls(array $contact):array { $profileIds = $this->getProfileIds($contact); $urls = []; foreach ($profileIds as $profileId) { - $recipe = 'https://mobile.twitter.com/{socialId}'; + $recipe = 'https://twitter.com/{socialId}'; $connector = str_replace("{socialId}", $profileId, $recipe); - $connector = $this->getFromHtml($connector, '_normal'); + $connector = $this->getFromHtml($connector, 'profile_image'); $urls[] = $connector; } return $urls; diff --git a/tests/unit/Service/Social/TwitterProviderTest.php b/tests/unit/Service/Social/TwitterProviderTest.php index fbaf05ca9..45d527d43 100644 --- a/tests/unit/Service/Social/TwitterProviderTest.php +++ b/tests/unit/Service/Social/TwitterProviderTest.php @@ -100,16 +100,16 @@ public function dataProviderGetImageUrls() { ] ]; $contactWithSocialUrls = [ - "https://mobile.twitter.com/username1", - "https://mobile.twitter.com/username2", + "https://twitter.com/username1", + "https://twitter.com/username2", ]; $contactWithSocialHtml = [ - '', - '', + '', + '', ]; $contactWithSocialImgs = [ - "username1_400x400.jpg", - "username2_400x400.jpg" + "./profile_images/username1_400x400.jpg", + "./profile_images/username2_400x400.jpg" ]; $contactWithoutSocial = [