php - Instagram video fetching not working?
686
I am trying to show video from instagram,but its not working for me.I am giving the code below:
<?php foreach ($result->data as $post): ?>
<!-- Renders images. @Options (thumbnail,low_resoulution, high_resolution) -->
<a class="group" rel="group1" href="<?= $post->images->standard_resolution->url ?>"><img src="<?= $post->images->thumbnail->url ?>"></a>
<?php endforeach ?>
Above code is performing well for image,any idea how to display video.If possible than suggest me about pagination also?
Answer
Solution:
According to the doc of the API you can check if the media is an image or a video.
Then just check it before create your HTML, somethin like this should work: