Skip to content

Instantly share code, notes, and snippets.

Christian Metz cosenary

  • Munich, Germany
Block or report user

Report or block cosenary

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cosenary
cosenary / instagramproxy.php
Created Apr 6, 2015
Instagram OAuth proxy
View instagramproxy.php
<?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;
@cosenary
cosenary / usermedia.php
Last active May 26, 2017
Load user's public Instagram media
View usermedia.php
<?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
*/
@cosenary
cosenary / ratelimit.php
Created Nov 8, 2014
Instagram PHP API - Receive ratelimit header
View ratelimit.php
<?php
/**
* Instagram PHP API
*
* @link https://github.com/cosenary/Instagram-PHP-API
* @author Christian Metz
* @since 8.11.2014
*/
@cosenary
cosenary / index.php
Last active Jun 17, 2019
Instagram API login (with sessions)
View index.php
<?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');
View page-progress.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page progress example</title>
<style>
body {
background-color: #fff;
}
#page_progress {
@cosenary
cosenary / follow.php
Last active Jul 23, 2018
Instagram API class - follow user example
View follow.php
<?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
));
@cosenary
cosenary / follower.json
Last active Feb 13, 2019
Instagram display user follower example.Simply replace the success.php file in the example folder by this one and fill in your API credentials.
View follower.json
{
"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
}
@cosenary
cosenary / Benchmark.java
Last active Dec 19, 2015
Simple Benchmark chart class in Java.
View Benchmark.java
/**
* Benchmark chart.
* Fancy benchmark chart generator.
*
* @since 4.04.2013
* @author Christian Metz | christian@metzweb.net
* @version 1.0
*/
class Benchmark {
@cosenary
cosenary / index.php
Last active Jun 14, 2019
Instagram PHP API - Likes
View index.php
<?php
require 'Instagram.php';
use MetzWeb\Instagram\Instagram;
$instagram = new Instagram(array(
'apiKey' => 'YOUR_APP_KEY',
'apiSecret' => 'YOUR_APP_SECRET',
'apiCallback' => 'YOUR_APP_CALLBACK'
));
@cosenary
cosenary / ajax-script.js
Created Jun 22, 2012
Suggestion to improve `load-more button` for TDunham02
View ajax-script.js
// Relace the jQuery AJAX snippet by this:
$.ajax({
type: 'GET',
url: 'ajax.php',
data: {
tag: tag,
max_id: maxid
},
dataType: 'json',
You can’t perform that action at this time.