diff --git a/examples/instagram_popular_media.php b/examples/instagram_popular_media.php
new file mode 100644
index 0000000..c121314
--- /dev/null
+++ b/examples/instagram_popular_media.php
@@ -0,0 +1,57 @@
+post('https://api.instagram.com/oauth/access_token', array(
+ 'client_id' => INSTAGRAM_CLIENT_ID,
+ 'client_secret' => INSTAGRAM_CLIENT_SECRET,
+ 'grant_type' => 'authorization_code',
+ 'redirect_uri' => $redirect_uri,
+ 'code' => $code,
+ ));
+
+ if ($curl->error) {
+ echo $curl->response->error_type . ': ' . $curl->response->error_message . '
';
+ echo 'Try again?';
+ exit;
+ }
+
+ $_SESSION['access_token'] = $curl->response->access_token;
+}
+
+if (isset($_SESSION['access_token'])) {
+ $curl = new Curl();
+ $curl->get('https://api.instagram.com/v1/media/popular', array(
+ 'access_token' => $_SESSION['access_token'],
+ ));
+ foreach ($curl->response->data as $media) {
+ echo
+ '' .
+ '
' .
+ '';
+ }
+}
+else {
+ header('Location: https://api.instagram.com/oauth/authorize/?' . http_build_query(array(
+ 'client_id' => INSTAGRAM_CLIENT_ID,
+ 'redirect_uri' => $redirect_uri,
+ 'response_type' => 'code',
+ )));
+ exit;
+}