Recent media from a 2nd authorized Instagram user

Get the most recent media published by an authorized user. 

This example shows a 2nd Craft CMS user who has authorized Pic Puller for access with Instagram.

Notice that this is the user_id is the id from Craft, not from Instagram.

Note: This code example is for Pic Puller for Craft 2. If you're using Craft 3, the only difference is "picpuller" changes to "picPuller". The full Pic Puller for Craft 3 can be found here.

Documentation for this code example: Recent media

The code block below is generating the section that follows it.

{% for instagramdata in craft.picpuller.media_recent({'user_id' : 79,  'use_stale_cache' : true, 'limit': 4}) %}

  {% if loop.first %}
    <p>Status: {{ instagramdata.status }}</p>
    <p>Error Type: {{ instagramdata.error_type }}</p>
    <p>Error Message: {{ instagramdata.error_message }}</p>
  {% endif %}

  {% if instagramdata.status == 'true' %}
    <p>Loop Index: {{ loop.index }}</p>
    {% if instagramdata.video_low_resolution != '' %}
      <p>THERE IS VIDEO HERE!</p>
      <p>{{ instagramdata.video_low_resolution }}</p>
    {% endif %}
    <p><img src="{{instagramdata.low_resolution}}" alt='{{instagramdata.caption}}></p>
    <p>{{ instagramdata.media_id }}</p>
    <p>caption: {{instagramdata.caption}}</p>
    <p>created_time: {{ instagramdata.created_time }}</p>
  {% else %}
    <p>Error Type: {{ instagramdata.error_type }}</p>
    <p>Error Message: {{ instagramdata.error_message }}</p>
  {% endif %}

{% endfor %}
string(166) "400 [reason phrase] Bad Request [url]"