This a working example based on the previous posted workflow.
Feedback is as always welcome.
Original project repository: Instagram-PHP-API
/** | |
* Benchmark chart. | |
* Fancy benchmark chart generator. | |
* | |
* @since 4.04.2013 | |
* @author Christian Metz | christian@metzweb.net | |
* @version 1.0 | |
*/ | |
class Benchmark { |
// Relace the jQuery AJAX snippet by this: | |
$.ajax({ | |
type: 'GET', | |
url: 'ajax.php', | |
data: { | |
tag: tag, | |
max_id: maxid | |
}, | |
dataType: 'json', |
<?php | |
// Registered Instagram redirect URI: http://example.com/instagramproxy.php | |
// Custom YOUR_APP_CALLBACK redirect URI: http://example.com/instagramproxy.php?redirect=http://foo.com | |
// receive OAuth code parameter | |
$code = $_GET['code']; | |
$redirectHost = $_GET['redirect']; | |
$instagramEndpoint = $redirectHost . "/success.php?code=" . $code; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page progress example</title> | |
<style> | |
body { | |
background-color: #fff; | |
} | |
#page_progress { |
<?php | |
/** | |
* Instagram PHP API | |
* Example for using the getUserMedia() method | |
* | |
* @link https://github.com/cosenary/Instagram-PHP-API | |
* @author Christian Metz | |
* @since 4.04.2014 | |
*/ |
This a working example based on the previous posted workflow.
Feedback is as always welcome.
Original project repository: Instagram-PHP-API
<?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 | |
*/ |
<?php | |
require 'Instagram.php'; | |
use MetzWeb\Instagram\Instagram; | |
$instagram = new Instagram(array( | |
'apiKey' => 'YOUR_APP_KEY', | |
'apiSecret' => 'YOUR_APP_SECRET', | |
'apiCallback' => 'YOUR_APP_CALLBACK' | |
)); |
<?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'); |