Import Instagram post to WordPress blog post

I’m not currently aware of other ways rather then:

  • Creating an Instagram App
  • Get an access token
  • Build a small API handler

Something like this to put in your functions.php:

function my_instagram()
{
    $transient_key = 'instagram_data';
    $feed_data = get_transient( $transient_key );
    if( false === $feed_data ) {
        $feed_data = json_decode(file_get_contents('https://api.instagram.com/v1/users/self/media/recent/?access_token=<ACCESS_TOKEN>&count=4'));
        if ( is_array( $feed_data->data ) ) {
            set_transient( $transient_key, $feed_data->data, 60*60*24 );
        }
    }
    return $feed_data;
}

Later of course you can manipulate your $feed_data as you need. Adjust the transient according to your requirements.

It’s called feed because it is what it is. I’m afraid though they lately restricted the endpoints. Read more https://www.instagram.com/developer/endpoints/.

You can generate intagram access tokens here https://instagram.pixelunion.net/.