2017 © Pedro Peláez
 

library instaphp

A library for accessing Instagram's API (v2)

image

delta98/instaphp

A library for accessing Instagram's API (v2)

  • Friday, September 12, 2014
  • by delta98
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 86 Forks
  • 0 Open issues
  • 20 Versions
  • 0 % Grown

The README.md

Instaphp V2

This is version 2 of Instaphp. It's a complete rewrite from version 1 and is not backwards compatible. If you're using v1 and want to update to v2, you'll have to make a few changes. Some of the method names have changed and configuration is no longer an XML file. There are unit tests, but given the less than stellar reliability of Instagram's API, they are fairly useless., (*1)

If you're using composer, you shouldn't need to worry about dependancies. If you're not, you will have to figure out the include chain. The new version relies on [GuzzleHttp][3]., (*2)

It's not battle tested so I can't speak to it's reliability/speed/ease of use, but the unit test (generally) all pass. I will keep this in the development branch for a while until I think it's ready to move into master., (*3)

Usage

Here's a basic example showing how to get 10 popular posts..., (*4)

php 'your client id', 'client_secret' => 'your client secret', 'redirect_uri' => 'http://somehost.foo/callback.php', 'scope' => 'comments+likes' ]); $popular = $api->Media->Popular(['count' => 10]); if (empty($popular->error)) { foreach ($popular->data as $item) { printf('', $item['images']['low_resolution']['url']); } } ?>, (*5)

Configuration

Configuration is now a simple array of key/value pairs. The absolute minimum required setting is client_id, but if you plan to allow users to login via OAuth, you'll need client_secret & redirect_uri. All the other settings are optional and/or have sensible defaults., (*6)

Key Default Value Description
access_token Empty This is the access token for an authorized user. You obtain this from API via OAuth
redirect_uri Empty The redirect URI you defined when setting up your Instagram client
client_ip Empty The IP address of the client. This is used to sign POST & DELETE requests. It's not required, but without the signing, users are more limited in how many likes/comments they can post in a given hour
scope comments+relationships+likes The scope of your client's capability
log_enabled TRUE Enable logging
log_level DEBUG Log level. See Monolog Logger
log_path ./instaphp.log Where the log file lives
http_useragent Instaphp/2.0; cURL/{curl_version}; (+http://instaphp.com) The user-agent string sent with all requests
http_timeout 6 Timeout for requests to the API.
http_connect_timeout 2 Timeout for http connect
debug FALSE Debug mode?
event.before Empty Callback called prior to sending the request to the API. Method takes a single parameter BeforeEvent
event.after Empty Callback called after a response is received from the API. Method takes a single parameter of CompleteEvent
event.error Empty Callback called when an error response is received from the API. Method takes a single parameter of ErrorEvent.

The Versions

12/09 2014

dev-master

9999999-dev http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

12/09 2014

2.1

2.1.0.0 http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

29/07 2014

2.0.10

2.0.10.0 http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

29/07 2014

dev-development

dev-development http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

12/07 2014

2.0.9

2.0.9.0 http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

12/07 2014

2.0.8

2.0.8.0 http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

12/07 2014

2.0.7

2.0.7.0 http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

22/06 2014

2.0.6

2.0.6.0 http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

06/04 2014

2.0.5-beta

2.0.5.0-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

06/04 2014

2.0.4.4-beta

2.0.4.4-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

06/04 2014

2.0.4.3-beta

2.0.4.3-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

05/04 2014

2.0.4.2-beta

2.0.4.2-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

04/04 2014

2.0.4.1-beta

2.0.4.1-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

04/04 2014

2.0.4-beta

2.0.4.0-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

library instagram instaphp

25/03 2014

2.0.3.1-beta

2.0.3.1-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

library instagram instaphp

25/03 2014

2.0.3-beta

2.0.3.0-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

library instagram instaphp

27/10 2013

2.0.2.1-beta

2.0.2.1-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

library instagram instaphp

14/10 2013

2.0.2-beta

2.0.2.0-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

library instagram instaphp

30/09 2013

2.0.1-beta

2.0.1.0-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

library instagram instaphp

28/09 2013

2.0-beta

2.0.0.0-beta http://instaphp.com

A library for accessing Instagram's API (v2)

  Sources   Download

MIT

The Requires

 

library instagram instaphp