Instagram wp_remote_get Not Working
-
<?php $result = wp_remote_get("https://api.instagram.com/v1/users/***/media/recent/?access_token=1*************&count=60", true); $decode = json_decode($result['body'], true); foreach ($decode->data as $post) { if(empty($post->caption->text)) { // Do Nothing } else { echo '<a class="instagram-unit" target="blank" href="'.$post->link.'"> <img src="'.$post->images->low_resolution->url.'" alt="'.$post->caption->text.'" width="50" height="auto" /> </a>'; } } ?>
Im trying to pull instagram images using this code so i can use it to perform another jquery script but i cant get this work can you check?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Instagram wp_remote_get Not Working’ is closed to new replies.