Add Instagram search photos example

This commit is contained in:
Zach Borboa
2014-03-30 07:31:05 -07:00
parent 2f18692d9a
commit 5e7b16b7b0
+17
View File
@@ -0,0 +1,17 @@
<?php
require '../src/Curl.class.php';
define('INSTAGRAM_CLIENT_ID', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
$curl = new Curl();
$curl->get('https://api.instagram.com/v1/media/search', array(
'client_id' => INSTAGRAM_CLIENT_ID,
'lat' => '37.8296',
'lng' => '-122.4832',
));
foreach ($curl->response->data as $media) {
$image = $media->images->low_resolution;
echo '<img alt="" src="' . $image->url . '" width="' . $image->width . '" height="' . $image->height . '" />';
}