diff --git a/Classes/CodeQ/Instagram/Domain/Service/InstagramService.php b/Classes/CodeQ/Instagram/Domain/Service/InstagramService.php index bd57341..0b441d4 100644 --- a/Classes/CodeQ/Instagram/Domain/Service/InstagramService.php +++ b/Classes/CodeQ/Instagram/Domain/Service/InstagramService.php @@ -46,7 +46,7 @@ public function getFeed() $token = $this->getToken()['token']; $apiData = [ - 'fields' => 'id,caption,permalink,media_type,media_url,timestamp', + 'fields' => 'id,caption,permalink,media_type,media_url,thumbnail_url,timestamp', 'access_token' => $token ]; diff --git a/Resources/Private/Fusion/Image.fusion b/Resources/Private/Fusion/Image.fusion index 1022012..8b405d6 100644 --- a/Resources/Private/Fusion/Image.fusion +++ b/Resources/Private/Fusion/Image.fusion @@ -5,7 +5,7 @@ prototype(CodeQ.Instagram:Image) < prototype(Neos.Fusion:Component) { renderer = afx`
  • - {props.item.caption} + {props.item.caption}
  • ` diff --git a/Resources/Private/Fusion/ImagesList.fusion b/Resources/Private/Fusion/ImagesList.fusion index f0b159d..f375d19 100644 --- a/Resources/Private/Fusion/ImagesList.fusion +++ b/Resources/Private/Fusion/ImagesList.fusion @@ -1,9 +1,9 @@ prototype(CodeQ.Instagram:ImagesList) < prototype(Neos.Fusion:Component) { limit = 6 # currently get images returns up to 24 items as first page - # but since not all feed items are images, you might get less and should consider getting - # a second page when you need more then ~10 images. - collection = ${Array.filter(Instagram.getFeed(), item => item.media_type == 'IMAGE')} + # but since not all feed items have a media_url or a thumbnail_url + # consider getting a second page when you need more then ~10 images. + collection = ${Array.filter(Instagram.getFeed(), item => item.thumbnail_url || item.media_url)} attributes = Neos.Fusion:Attributes renderer = afx`