User information for a 2nd authorized Instagram user

This example shows how to get information about a 2nd authorized Instagram user using Pic Puller for Craft. 

This user is not an Admin, but does have access to the Craft CMS control panel.


Documentation for this code example: User information

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

{% for instagramdata in craft.picpuller.user({'use_stale_cache' : false, 'user_id' : 2 }) %}
  <p>Status: {{ instagramdata.status ? 'All good.' : 'Not good.' }}</p>
  <p>Is cached data used? {{ instagramdata.cacheddata ? 'yes' : 'no' }}</p>
  {% if instagramdata.status == TRUE %}
    <p>username: {{ instagramdata.username }}</p>
    <p>full_name: {{ instagramdata.full_name }}</p>
    <p>profile_picture:</p>
    <p><img src="{{ instagramdata.profile_picture }}" alt='{{ instagramdata.full_name }}'></p>
    <p>counts_media: {{ instagramdata.counts_media }}</p>
    <p>counts_followed_by: {{ instagramdata.counts_followed_by }}</p>
  {% else %}
    <p>Error Type: {{ instagramdata.error_type }}</p>
    <p>Error Message: {{ instagramdata.error_message }}</p>
  {% endif %}
{% endfor %}

Status: Not good.

Is cached data used? no

Error Type: HTTP_error

Error Message: The Instagram API did not return a response.