Fieldtype, Module


CE Tweet

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Causing Effect


How do I get images to display

Support Request

Paul Frost
Paul Frost

I would like to show a thumbnail of images that are linked to in a tweet. Just like twitter does in it’s widget and Twitterific does. But I can’t see the code for it anywhere in the examples.

Tom van de Wetering
# 1
Tom van de Wetering

Hi Paul. I had to dive into the Twitter API because media/images aren’t described in the CE Tweet docs, but after some experimentation I got it working: calling {entities_media}{media_url}{/entities_media} works for me.

<!—example 1: replace tweets without images with a placeholder image—>
{exp:ce_tweet:user_timeline screen_name=“some_username” count=“4”}
  {exp:ce_tweet:show id=”{id}” link=”“}

<!—example 2: only display tweets with media/images via filter:images—>
q=‘search terms filter:images’
  {exp:ce_tweet:show id=”{id}” link=”“}

# 2


I’m so glad you posted this answer, I never would have figured this out otherwise. Do you know if it’s likewise possible to show a video attached to a tweet? Twitter’s docs indicate this should be possible within the equivalent of the “show” tag, but I’m not sure what the syntax should be.

Thank you!