1

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)?

2
  • COSIGN! Please post it. I'd love to use it
    – thesrpr
    Apr 30, 2012 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, 2012 at 16:22

1 Answer 1

2

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/

3
  • 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, 2012 at 3:50
  • @GavinR Please do post here when you publish. :) Mar 12, 2012 at 13:48
  • Ever Get something put together? Jul 24, 2012 at 6:21

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