Frequently asked questions

Does Pic Puller save images into an ExpressionEngine site?

No. It pulls the information about images from Instagram which includes urls for various sizes of the images. No files are added to your upload directories in ExpressionEngine.

Can I have both Pic Puller Lite and the full version of Pic Puller installed at the same time?

You can, but you would need two different applications defined with Instagram. Instagram limits a developer account to 5 applications.

Since the full version of Pic Puller contains all of the functions of Pic Puller Lite, you should update your templates with the new template tags to use Pic Puller. The only difference in the tags between Pic Puller Lite and Pic Puller are the “_lite” at the end of the ExpressionEngine tag.

Why does 'use_stale_cache' default to 'yes'? Why would I want 'old' pictures?

The default setting of ‘use_stale_cache’ attempts to smooth over instances where Instagram doesn’t respond to a request.

Setting this to ‘yes’ seemed like the most sensible default value.

But why would Instagram not respond, you might ask? This can happen for a variety of reasons. Sometimes the API simply doesn’t respond. Sometimes you may go over the limit Instagram has set for accessing their API. At the time I write this, January 2012, that limit is 5000 requests per hour per user. It seems pretty generous, but if you happen to exceed that, Pic Puller stores a cached version of your last successful request and will fall back to that data if something unexpected happens.

Why is "status" returned in a Pic Puller loop?

I was asked about the ‘status’ recently and realized it may not be very clear what you’d do with that value.

Checking status in a Pic Puller loop let’s you test for a successful retrieval from the Instagram API. Pic Puller tries to use cached data if there is a connection problem with Instagram, but status returning “false” means there was no photo data to present return, either from Instagram or from your cache. If that’s the case, 2 new values are returned, error_type and error_message. Check out the example here on the site at the Unauthorized User page.

In this page, the status returns “false” and and error is thrown because Instagram won’t provide data for a user that hasn’t authorized with Instagram.

This isn’t the only circumstance where data might not be available though. Sometimes the Instagram API goes down. If you don’t have any cached data and you’re not checking the status, you run the risk of broken images tags being displayed on the front end of your site.

One way to use the status = false part of the loop to show some ‘canned’ images that you host locally on your own server. When the API comes back up again, you’ll be back in business with the real Instagram feed.

Checking the status isn’t necessary, but it help you deal with unexpected circumstances.

Why isn't Pic Puller returning a particular piece of data in my ig_picpuller:media loop?

Instagram returns a number of pieces of data and Pic Puller uses the same naming conventions that Instagram uses. Pic Puller isn’t aware of the names of custom fields you may have defined in your ExpressionEngine site and this can lead to naming conflicts. In this battle, your channel data wins and can interfere with the return of data from Instagram.

To prevent this collision, the names of your custom fields should not use the same name as the returned Instagram data. For example, ‘caption’ is what Instagram calls the title of an image. If you were using the ig_picpuller:media tag pair to pull in an image into an entry inside a channel that had a custom field with the name ‘caption’, Pic Puller would not be able to return the ‘caption’ (aka, the title) of your image due to naming conflict. To fix this issue, use a unique name for your custom field that doesn’t conflict with the Instagram provided data.

Is Pic Puller compatible with ExpressionEngine Multiple Site Manager?

Yes, Pic Puller is compatible with ExpressionEngine Multiple Site Manager, aka MSM. (Learn all about the ExpressionEngine MSM package here).

If you have MSM installed, you can define more than one site to run under a single EE installation. Pic Puller now supports adding and managing multiple Instagram applications, one Instagram application for each site. Each EE site will have it’s own Instagram application and its own set of users.

The biggest difference you will notice from a typical Pic Puller installation and a MSM Pic Puller installation is the authorization process. The domain you access your control panel from will authorize that same domain’s Instagram application through either the control panel or through the front-end authorization process. That means if you have your control panel for siteA.com at siteA.com/system/, that authorization process can happen through the control panel or through a front-end template. But if you have siteB.com being managed from siteA.com/system/, you will need to authorize your Instagram application from a template you create that is accessible from siteB.com, for example, siteB.com/myAuth. The other option is to log into the control panel from siteB.com/system/. As long as the domain’s match, you can authorize from the control panel.

This update was based on a suggestion from a user. Got a suggestion? Please let me know about it.

Having oAuth authenication errors?

Instagram is very strict about having a match for your redirection URL. It also does not strip off trailing spaces in your redirect URL if you happen to have added a space at the end. It’s the first thing to check if you run into this error.

Can I reset my Client Secret?

Yes, you can reset your client secret without requiring your users to reauthorize your application.

Log in as a Super Admin to your ExpressionEngine control panel and open the Pic Puller module page. You will find a “Current App Info” button on the top right of the module which will show you your current Client ID and Client Secret. If you need to update your Client Secret, click “edit secret”. You will be able to update to your new Client Secret.

Getting fewer images back than specified?

This is not an error in Pic Puller, but is a result of the way Instagram processes a feed request. (See http://groups.google.com/group/instagram-api-developers/browse_thread/thread/b24bc67040d701e7/edf7074a839880fb?lnk=gst&q=count#edf7074a839880fb .) The short explanation as to why you’re receiving fewer images than you requested is that you actually did retrieve the correct number of images, but a user has deleted an image from that set of results. How the feed is processed on Instagram¬ís side is that the request for a certain number of images is made and then, if any image is in that list that has been deleted by a user, it is removed at that point, before the feed is then set out.

Why do I get the error "Call to undefined function json_decode()"?

Pic Puller uses the json_decode function to parse the data coming in from Instagram. This function was added to PHP in version 5.2. You may be on a prior version of PHP.