User information for authorized Instagram user

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

Notice that this is the user_id attribute 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: 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' : 1 }) %}
  <p>Status: {{ instagramdata.status ? 'All good.' : 'Not good.' }}</p>
  
  {% if instagramdata.status == TRUE %}
    <p>Is cached data used? {{ instagramdata.cacheddata ? 'yes' : 'no' }}</p>
    <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 %}
string(142) "400 [reason phrase] Bad Request [url] https://api.instagram.com/v1/users/1500897?access_token=1500897.13fd619.c019cd97a5e04e64b514f274047a053c"