Enter your Instagram client id and display the first results.
Then store the next_max_id which you receive if you call:
$media->pagination->next_max_id;
| <?php | |
| /** | |
| * Instagram PHP API | |
| * Example for using the getUserMedia() method | |
| * | |
| * @link https://github.com/cosenary/Instagram-PHP-API | |
| * @author Christian Metz | |
| * @since 31.01.2012 | |
| */ |
This a working example based on the previous posted workflow.
Feedback is as always welcome.
Original project repository: Instagram-PHP-API
| // Relace the jQuery AJAX snippet by this: | |
| $.ajax({ | |
| type: 'GET', | |
| url: 'ajax.php', | |
| data: { | |
| tag: tag, | |
| max_id: maxid | |
| }, | |
| dataType: 'json', |
| <?php | |
| require 'Instagram.php'; | |
| use MetzWeb\Instagram\Instagram; | |
| $instagram = new Instagram(array( | |
| 'apiKey' => 'YOUR_APP_KEY', | |
| 'apiSecret' => 'YOUR_APP_SECRET', | |
| 'apiCallback' => 'YOUR_APP_CALLBACK' | |
| )); |
| /** | |
| * Benchmark chart. | |
| * Fancy benchmark chart generator. | |
| * | |
| * @since 4.04.2013 | |
| * @author Christian Metz | [email protected] | |
| * @version 1.0 | |
| */ | |
| class Benchmark { |
| { | |
| "username": "moo", | |
| "bio": "We print things.", | |
| "website": "http://www.moo.com", | |
| "profile_picture": "http://images.ak.instagram.com/profiles/profile_7927894_75sq_1378988556.jpg", | |
| "full_name": "MOO Print", | |
| "id": 7927894 | |
| } |
| <?php | |
| require 'Instagram.php'; | |
| use MetzWeb\Instagram\Instagram; | |
| $instagram = new Instagram(array( | |
| 'apiKey' => 'YOUR_APP_KEY', | |
| 'apiSecret' => 'YOUR_APP_SECRET', | |
| 'apiCallback' => 'YOUR_APP_CALLBACK' // must point to success.php | |
| )); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Page progress example</title> | |
| <style> | |
| body { | |
| background-color: #fff; | |
| } | |
| #page_progress { |
| <?php | |
| require '../src/Instagram.php'; | |
| use MetzWeb\Instagram\Instagram; | |
| session_start(); | |
| if (isset($_SESSION['access_token'])) { | |
| // user authentication -> redirect to media | |
| header('Location: success.php'); |