<p>I have used it like this. You can find the documentation for most fields on <a href="https://dev.twitter.com/overview/api/tweets" rel="nofollow">Twitter</a>. Truth be told, the DUKT documentation is not too transparent.</p>

<pre><code>{% set tweets = craft.twitter.get('statuses/user_timeline', { user_id:'', count: 10, trim_user: false }) %}
{% if tweets %}
    &lt;ul class="tweet__list"&gt;
        {% for tweet in tweets %}
        &lt;li"&gt;
           &lt;img src="{{ tweet.user.profile_image_url }}" alt=""&gt;
           &lt;p&gt;{{tweet.text|autoLinkTweet}}&lt;/p&gt;
           &lt;span class="date"&gt;{{ tweet.created_at | twitterTimeAgo )}&lt;/span&gt;        
        &lt;/li&gt;
        {% endfor %}
    &lt;/ul&gt;
{% endif %}
</code></pre>

<p><strong>Update</strong></p>

<p>You have several entities in the data you get back from Twitter API (as described by Twitter):  media, urls, user_mentions, hashtags, and symbols. The DUKT plugin, however only gives back urls, user_mentions, hashtags, and symbols as far as I see in the error messages they provide. </p>

<pre><code> {{tweet.entities}}
</code></pre>

CC BY-SA 3.0
2016-10-02T20:59:12.997Z
Bedankt Jan, the {{ tweet.created_at)} tag renders an error, but I am looking for the tag which produces the tweeted image, not the user profile image.
Nutmeg
CC BY-SA 3.0
2016-10-03T06:12:40.250Z
I have tried all sorts of combos with             <img src="{{tweet.media_url_https}}" alt=""> and             <img src="{{tweet.media_url}}" alt=""> but neither work....
Nutmeg
CC BY-SA 3.0
2016-10-03T07:46:54.713Z
updated the answer and the created_at tag ;)
Jan_dh
CC BY-SA 3.0
2016-10-03T07:55:37.587Z
Thanks again, Jan your answer explains the deafening silence by DUKT. The image tag is the main feature by my client, so no use for this plugin then.....
Nutmeg
CC BY-SA 3.0
2016-10-18T05:46:25.043Z
Found an answer on this thread; (http://craftcms.stackexchange.com/questions/17305/is-it-possible-to-get-a-tweet-image-when-using-twitter-plugin)
Nutmeg
CC BY-SA 3.0
2016-10-02T09:09:30.380Z
2016-10-03T07:44:58.023Z
2016-10-03T07:44:58.023Z
Jan_dh
<p>I am using DUKT's Twitter 1.0.32 but am fresh at reading APIs, so would like a little help. 
I would like to request tweets with image only from our main ID.</p>

<pre><code> {% set tweets = craft.twitter.get('statuses/user_timeline', {count:3}) %}
</code></pre>

<p>This works fine, but even an attempt to play around with the other parameters within user_timeline baffles me.</p>

<p>Could I ask for some examples to display tweet text &amp; image, plus some other relevant parameters?</p>

<plugin-dukttwitter>
Twitter API request for images with DUKT twitter
# Twitter API request for images with DUKT twitter

(Asked by: username_0 on 2016-09-30)

I am using DUKT's Twitter 1.0.32 but am fresh at reading APIs, so would like a little help. 
I would like to request tweets with image only from our main ID.
 {% set tweets = craft.twitter.get('statuses/user_timeline', {count:3}) %}

This works fine, but even an attempt to play around with the other parameters within user_timeline baffles me.
Could I ask for some examples to display tweet text & image, plus some other relevant parameters?

**Tags:** plugin-dukttwitter


---

## 1 answers

### Answer by username_1 on 2016-10-02. Score: 1 | Accepted answer

I have used it like this. You can find the documentation for most fields on Twitter. Truth be told, the DUKT documentation is not too transparent.
{% set tweets = craft.twitter.get('statuses/user_timeline', { user_id:'', count: 10, trim_user: false }) %}
{% if tweets %}
    
        {% for tweet in tweets %}
        
           
           {{tweet.text|autoLinkTweet}}
           {{ tweet.created_at | twitterTimeAgo )}        
        
        {% endfor %}
    
{% endif %}

Update
You have several entities in the data you get back from Twitter API (as described by Twitter):  media, urls, user_mentions, hashtags, and symbols. The DUKT plugin, however only gives back urls, user_mentions, hashtags, and symbols as far as I see in the error messages they provide. 
 {{tweet.entities}}

> **Comments:**
> **username_0**: Bedankt Jan, the {{ tweet.created_at)} tag renders an error, but I am looking for the tag which produces the tweeted image, not the user profile image.  
> **username_0**: I have tried all sorts of combos with             <img src="{{tweet.media_url_https}}" alt=""> and             <img src="{{tweet.media_url}}" alt=""> but neither work....  
> **username_1**: updated the answer and the created_at tag ;)  
> **username_0**: Thanks again, Jan your answer explains the deafening silence by DUKT. The image tag is the main feature by my client, so no use for this plugin then.....  
> **username_0**: Found an answer on this thread; (http://craftcms.stackexchange.com/questions/17305/is-it-possible-to-get-a-tweet-image-when-using-twitter-plugin)  

---

