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 / success.php
Last active Jul 30, 2018
Instagram PHP API - How to get the most recent media published by an Instagram user.
View success.php
<?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
*/
@cosenary
cosenary / README.markdown
Last active Nov 26, 2015
Instagram PHP API - How to implement a load more button (AJAX)
View README.markdown

Instagram PHP API

How to use

index.php file

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;
@cosenary
cosenary / README.markdown
Last active Dec 29, 2017
Instagram PHP API - Working example: Load more button (AJAX)
View README.markdown

Instagram PHP API

How to use

This a working example based on the previous posted workflow.
Feedback is as always welcome.

Original project repository: Instagram-PHP-API

index.php file

@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',
@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 / 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 / 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 / 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
));
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 / 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');
You can’t perform that action at this time.