WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to post my Instagram photos to my WordPress blog.

I cannot use one of the many existing Instagram plugins, though, because those plugins simply post the images on my blog but they are still hosted by Instagram. I'd like this to be a batch process that will actually upload the Instagram photo to my WordPress media library and then post it.

In summary: How do I automatically upload and post Instagram photos to my WordPress blog (not via a sidebar widget)?

share|improve this question
COSIGN! Please post it. I'd love to use it – thesrpr Apr 30 '12 at 6:07
This got put at the bottom of my to-do list, but I will get it posted soon. Stay tuned. – GavinR May 15 '12 at 16:22
up vote 2 down vote accepted

You'll probably have to do your own integration, but here's how I would approach it:

  1. Grab an Instagram PHP wrapper: http://www.mauriciocuenca.com/blog/2011/02/instagram-api-implementation-in-php/ OR http://instaphp.com OR https://github.com/cosenary/Instagram-PHP-API
  2. Authenticate via an admin option page
  3. Iterate through your user images using the /users/self/feed method
  4. Use the media_sideload_image() function found in wp-admin/includes/media.php to download the images
  5. Keep a running cache of downloaded Instagram image IDs in an option to check before downloading an image.

If you want this to work as a WordPress gallery, you could assign a specific post ID to media_sideload_image and then include a gallery on that post.

It seems pretty straightforward. Check out the API documentation for self/feed: http://instagram.com/developer/endpoints/users/

share|improve this answer
Thanks for the help. I have the plugin written and working - just cleaning it up a bit, and then will probably publish for the world to see. Thanks. – GavinR Mar 12 '12 at 3:50
@GavinR Please do post here when you publish. :) – Brian Fegter Mar 12 '12 at 13:48
Ever Get something put together? – Zach Lysobey Jul 24 '12 at 6:21

protected by Community Feb 10 '13 at 23:35

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.