Code Monkey home page Code Monkey logo

instagram-php-api's Introduction

Image Instagram PHP API V2

Note: On the 17 Nov 2015 Instagram made changes to their API . Apps created before Nov 17, 2015 wont be affected until Jun 2016. Apps created on or after Nov 17 2015 will require to use their updated API. Please note that this library doesn't yet support their new updates. For more information, please see #182.

A PHP wrapper for the Instagram API. Feedback or bug reports are appreciated.

Total Downloads Latest Stable Version License

Composer package available.
Supports Instagram Video and Signed Header.

Requirements

  • PHP 5.3 or higher
  • cURL
  • Registered Instagram App

Get started

To use the Instagram API you have to register yourself as a developer at the Instagram Developer Platform and create an application. Take a look at the uri guidelines before registering a redirect URI. You will receive your client_id and client_secret.


Please note that Instagram mainly refers to »Clients« instead of »Apps«. So »Client ID« and »Client Secret« are the same as »App Key« and »App Secret«.


A good place to get started is the example project.

Installation

I strongly advice using Composer to keep updates as smooth as possible.

$ composer require cosenary/instagram

Initialize the class

use MetzWeb\Instagram\Instagram;

$instagram = new Instagram(array(
	'apiKey'      => 'YOUR_APP_KEY',
	'apiSecret'   => 'YOUR_APP_SECRET',
	'apiCallback' => 'YOUR_APP_CALLBACK'
));

echo "<a href='{$instagram->getLoginUrl()}'>Login with Instagram</a>";

Authenticate user (OAuth2)

// grab OAuth callback code
$code = $_GET['code'];
$data = $instagram->getOAuthToken($code);

echo 'Your username is: ' . $data->user->username;

Get user likes

// set user access token
$instagram->setAccessToken($data);

// get all user likes
$likes = $instagram->getUserLikes();

// take a look at the API response
echo '<pre>';
print_r($likes);
echo '<pre>';

All methods return the API data json_decode() - so you can directly access the data.

Available methods

Setup Instagram

new Instagram(<array>/<string>);

array if you want to authenticate a user and access its data:

new Instagram(array(
	'apiKey'      => 'YOUR_APP_KEY',
	'apiSecret'   => 'YOUR_APP_SECRET',
	'apiCallback' => 'YOUR_APP_CALLBACK'
));

string if you only want to access public data:

new Instagram('YOUR_APP_KEY');

Get login URL

getLoginUrl(<array>)

getLoginUrl(array(
	'basic',
	'likes'
));

Optional scope parameters:

Scope Legend Methods
basic to use all user related methods [default] getUser(), getUserFeed(), getUserFollower() etc.
relationships to follow and unfollow users modifyRelationship()
likes to like and unlike items getMediaLikes(), likeMedia(), deleteLikedMedia()
comments to create or delete comments getMediaComments(), addMediaComment(), deleteMediaComment()

Get OAuth token

getOAuthToken($code, <true>/<false>)

true : Returns only the OAuth token
false [default] : Returns OAuth token and profile data of the authenticated user

Set / Get access token

  • Set the access token, for further method calls: setAccessToken($token)
  • Get the access token, if you want to store it for later usage: getAccessToken()

User methods

Public methods

  • getUser($id)
  • searchUser($name, <$limit>)
  • getUserMedia($id, <$limit>)

Authenticated methods

  • getUser()
  • getUserLikes(<$limit>)
  • getUserFeed(<$limit>)
  • getUserMedia(<$id>, <$limit>)
    • if an $id isn't defined or equals 'self', it returns the media of the logged in user

Sample responses of the User Endpoints.

Relationship methods

Authenticated methods

  • getUserFollows($id, <$limit>)
  • getUserFollower($id, <$limit>)
  • getUserRelationship($id)
  • modifyRelationship($action, $user)
    • $action : Action command (follow / unfollow / block / unblock / approve / deny)
    • $user : Target user id
// Follow the user with the ID 1574083
$instagram->modifyRelationship('follow', 1574083);

Please note that the modifyRelationship() method requires the relationships scope.


Sample responses of the Relationship Endpoints.

Media methods

Public methods

  • getMedia($id)
    • authenticated users receive the info, whether the queried media is liked
  • getPopularMedia()
  • searchMedia($lat, $lng, <$distance>, <$minTimestamp>, <$maxTimestamp>)
    • $lat and $lng are coordinates and have to be floats like: 48.145441892290336,11.568603515625
    • $distance : Radial distance in meter (default is 1km = 1000, max. is 5km = 5000)
    • $minTimestamp : All media returned will be taken later than this timestamp (default: 5 days ago)
    • $maxTimestamp : All media returned will be taken earlier than this timestamp (default: now)

Sample responses of the Media Endpoints.

Comment methods

Public methods

  • getMediaComments($id)

Authenticated methods

  • addMediaComment($id, $text)
    • restricted access: please email apidevelopers[at]instagram.com for access
  • deleteMediaComment($id, $commentID)
    • the comment must be authored by the authenticated user

Please note that the authenticated methods require the comments scope.


Sample responses of the Comment Endpoints.

Tag methods

Public methods

  • getTag($name)
  • getTagMedia($name)
  • searchTags($name)

Sample responses of the Tag Endpoints.

Likes methods

Authenticated methods

  • getMediaLikes($id)
  • likeMedia($id)
  • deleteLikedMedia($id)

How to like a Media: Example usage Sample responses of the Likes Endpoints.

All <...> parameters are optional. If the limit is undefined, all available results will be returned.

Instagram videos

Instagram entries are marked with a type attribute (image or video), that allows you to identify videos.

An example of how to embed Instagram videos by using Video.js, can be found in the /example folder.


Please note: Instagram currently doesn't allow to filter videos.


Signed Header

In order to prevent that your access tokens gets stolen, Instagram recommends to sign your requests with a hash of your API secret, the called endpoint and parameters.

  1. Activate "Enforce Signed Header" in your Instagram client settings.
  2. Enable the signed-header in your Instagram class:
$instagram->setSignedHeader(true);
  1. You are good to go! Now, all your requests will be secured with a signed header.

Go into more detail about how it works in the Instagram API Docs.

Pagination

Each endpoint has a maximum range of results, so increasing the limit parameter above the limit won't help (e.g. getUserMedia() has a limit of 90).

That's the point where the "pagination" feature comes into play. Simply pass an object into the pagination() method and receive your next dataset:

$photos = $instagram->getTagMedia('kitten');

$result = $instagram->pagination($photos);

Iteration with do-while loop.

Samples for redirect URLs

Registered Redirect URI Redirect URI sent to /authorize Valid?
http://yourcallback.com/ http://yourcallback.com/ yes
http://yourcallback.com/ http://yourcallback.com/?this=that yes
http://yourcallback.com/?this=that http://yourcallback.com/ no
http://yourcallback.com/?this=that http://yourcallback.com/?this=that&another=true yes
http://yourcallback.com/?this=that http://yourcallback.com/?another=true&this=that no
http://yourcallback.com/callback http://yourcallback.com/ no
http://yourcallback.com/callback http://yourcallback.com/callback/?type=mobile yes

If you need further information about an endpoint, take a look at the Instagram API docs.

Example App

Image

This example project, located in the example/ folder, helps you to get started. The code is well documented and takes you through all required steps of the OAuth2 process. Credit for the awesome Instagram icons goes to Ricardo de Zoete Pro.

More examples and tutorials:

Let me know if you have to share a code example, too.

Changelog

Please see the changelog file for more information.

Credits

Copyright (c) 2011-2015 - Programmed by Christian Metz

Released under the BSD License.

instagram-php-api's People

Contributors

apoikos13 avatar bitdeli-chef avatar brunohoff avatar catearcher avatar cosenary avatar gicolek avatar gmusliaj avatar guidobr avatar jonathantorres avatar licvido avatar marioperezesteso avatar mgoebelm avatar mynetx avatar orarbel avatar pixelbrackets avatar robwiddick avatar ryjogo avatar sophiekovalevsky avatar vinkla avatar xpallicer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

instagram-php-api's Issues

Further errors in localhost - wamp

When I try running the example in my wamp localhost I get:
( ! ) Fatal error: Uncaught exception 'Exception' with message 'Error: _makeCall() - cURL error: Problem (2) in the Chunked-Encoded data' in C:\wamp\www\insta\example\instagram.class.php on line 454
( ! ) Exception: Error: _makeCall() - cURL error: Problem (2) in the Chunked-Encoded data in C:\wamp\www\insta\example\instagram.class.php on line 454

If I comment out the line that throws the exception above I'm then greeted by this:
( ! ) Notice: Trying to get property of non-object in C:\wamp\www\insta\example\success.php on line 68
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\insta\example\success.php on line 68

I've already added these to lines to the _makeCall function:
curl__setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

Any help would be much appreciated.

user_has_liked missing from results

Hi,
i'm doing a simple query by location in Laravel, i instantiate $this->instagram in BaseController and access the methods in the different controllers.
If i try to parse $media = $this->instagram->getLocationMedia($id); i get correctly a list of media related to the location but the key user_has_liked is missing.
This is an example taken directly from the API:

 "id": "861...."
      },
      "user_has_liked": false,
      "id": "861....",
      "user": {

while if i do a print_r($media) i see:

 [type] => image
       [id] => 762...
              [user] => stdClass Object
               (
                    [username] => 

Any idea?

Exceptions error

you must throw global Exceptions like this:

throw new \Exception("Error: _makeCall() - cURL error: " . curl_error($ch));

instead of:

throw new Exception("Error: _makeCall() - cURL error: " . curl_error($ch));

or you have to write your own Exceptions in your namespace
otherwise php throws an exception "not found exception" =) without your error messages

Fatal error on timeout

Any suggestions on how to handle a fatal error? Sometimes my connection will time out and I see this error. The entire page will break down thereafter.

Fatal error:  Uncaught exception 'Exception' with message 'Error: _makeCall() - cURL error: Operation timed out after 0 milliseconds with 0 out of 0 bytes received' in 
/public/content/themes/slickfish/includes/vendor/instagram.class.php:459

Stack trace: 
#0 /includes/vendor/instagram.class.php(148): Instagram->_makeCall('users/645457279...', false, Array)
#1 /public/content/themes/slickfish/front-page.php(13): Instagram->getUserMedia(645457279, 14)
#2 [internal function]: klb_instagram_fetch('')
#3 /public/wp/wp-includes/plugin.php(470): call_user_func_array('klb_instagram_f...', Array)
#4 /public/content/themes/genesis/header.php(37): do_action('genesis_after_h...')
#5 /public/wp/wp-includes/template.php(501): requ in /public/content/themes/slickfish/includes/vendor/instagram.class.php on line 459

Thanks!

I don't really have an issue.. more of a question.

How could I write a function using this class file to loop through random users and like their newest photo in their feed? And I mean any user that is public, not just someone I'm following.

Can you help me with that?

Add X-RateLimit-Remaining API

When calling the instagram API, you're limited to 5000 calls per hour per token.
It would be very useful if your class/code had an attribute that stored that info so I could keep track of where my users are in their current hour's limit.

Is there a call to be made that will give the current limit without expending 1 call? Doesn't seem like it.

Subscriptions

Hi, can you add the subscribe API? That would be great. :)

How to login automatically

Hello,

I make the Class work, but I have to manually login every time I load the website. That it´s not a very practical solution. I would like to know if there´s and implemented way of auto login with every page load. The final users, does not need to manually load, only need to see the Instagram media feed.

I would like to thanks for your great work, of course. That´s my only issue, the Class works perfect.

Any suggestion or example? Thanks.

getUserMedia returns only null for other users

I can't seem to get 'getUserMedia' to return any data, authenticated or not. I'm trying to return the feed of another user. Works fine on the current authenticated user. Does anyone else have this issue or am I doing something wrong? I just want to return the users current feed, Ideally while not authenticated.

logging out

I'm having issues logging out. Clearing the current session and calling to the API to log me out. I'm only seeing a way to redirect to the Instagram site to do this.

undefined properties in pagination function

I'm not sure whether the API's pagination format changed recently, but when I hit /users/[user-id]/follows, the response has a pagination object with properties, next_url and next_cursor. The pagination function is looking for a next_max_id.

getUserMedia fails on private profil

Hello!

Your getUserMedia() method is currently doing wrong. It should provide an access_token for the request.

public function getUserMedia($id = 'self', $limit = 0) {
return $this->_makeCall('users/' . $id . '/media/recent', true, array('count' => $limit));
}

It drove me crazy for a couple of hours, as I provided scopes and a token...

Thank you!

Pagination Feedback

Hi Christian,

Good job on this class!

A few thoughts on the alpha pagination method.

We found that the current method was quite restrictive because you're having to pass the entire response from a previous call.

Instead, would it be better to just be able to pass the next_max_id into the method?

So the PHP method would simply be like this (Ignore the naming convention)

  public function paginationById($next_max_id) {
    if (true === is_int($next_max_id) ) {
      return $this->_makeCall($function, $auth, array('max_id' => $next_max_id));
    } else {
      throw new Exception("Error: pagination() | Pagination doesn't support this paramater type.");
    }
  }

This request requires scope=likes, but this access token is not authorized with this scope

hii ! I am using your code to get only Oath token and i save it in session. But when i code in curl for like post it gives me error . My code is as follows:

access_token; //Media_id is my own pic's id . it isn't private $url = "https://api.instagram.com/v1/media/884858208382661705_1620773884/likes"; $fields = array( 'access_token'=>$token ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl,CURLOPT_POST,1); curl_setopt($curl,CURLOPT_POSTFIELDS, http_build_query($fields)); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); echo curl_exec($curl); curl_close($curl); ?>

curl calls not working behind proxy and no curl proxy support

We have this issue.
It does not seem to be supported in this class...
Is this the code to be added to make this work?

variables:

  /**
   * Proxy server
   * @var unknown
   */
  private $proxy_server = false;

  /**
   * Proxy username
   * @var unknown
   */
  private $proxy_server_user = false;

  /**
   * Proxy password
   * @var unknown
   */
  private $proxy_server_pass = '';

The code to be added at the curl calls:

 $ch = curl_init();
    if ($this->proxy_server) {
      curl_setopt($ch, CURLOPT_PROXY, $this->proxy_server);
      if ($this->proxy_server_user) {
        $proxyauth = $this->proxy_server_user . ':' . $this->proxy_server_pass;
        curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyauth);
      }
    }
    curl_setopt($ch, CURLOPT_URL, $apiCall);

getters & setters

  /**
   * get the proxy server
   * @return unknown
   */
  public function getProxyServer() {
    return $this->proxy_server;
  }

  /**
   * set the proxy server
   * @param unknown $server
   */
  public function setProxyServer($server) {
    $this->proxy_server = $server;
  }

  /**
   * get the proxy server Username
   * @return unknown
   */
  public function getProxyUser(){
    return $this->proxy_server_user;
  }

  /**
   * get the proxy server password
   * @return unknown
   */
  public function getProxyPass(){
    return $this->proxy_server_pass;
  }

  /**
   * set the proxy username
   * @param unknown $user
   */
  public function setProxyUser($user){
    $this->proxy_server_user = $user;
  }

  /**
   * set the proxy password
   * @param unknown $pass
   */
  public function setProxyPass($pass){
    $this->proxy_server_pass = $pass;
  }

modifyRelationship() Not Working And Fatal Error

i have a question form this method,
why i always get a Fatal error,

and this report error
Fatal error: Uncaught exception 'Exception' with message 'Error: _makeCall() | users/1608280286/relationship - This method requires an authenticated users access token.' in /home/u225754132/public_html/instagram.class.php:314 Stack trace: #0 /home/u225754132/public_html/instagram.class.php(181): Instagram->_makeCall('users/160828028...', true, Array, 'POST') #1 /home/u225754132/public_html/follow.php(11): Instagram->modifyRelationship('follow', 1608280286) #2 {main} thrown in /home/u225754132/public_html/instagram.class.php on line 314

Please answer me, i give me a solutions
Thank you :)

having problem with lcoalhost

I am trying to getTagMedia and popularMedia but all these return:

Notice: Trying to get property of non-object in C:\xampp\htdocs\works\instagram\index.php on line 12
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\works\instagram\index.php on line 12

only happens on localhost,

Curl error #60: SSL certificate problem

Hello!

I was not able to get it working.
When I call getOAuthToken I get following cUrl exception.

Curl error #60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I tried to hardcode certificate, but it didn't work either. Can you please provide suggestion or workaround, of how to fix it.

I tried on local windows and on linux hosting machines. and I get the same error.

Cheerz!

Modify relationship

Modify Relationship always give me
This method requires an authenticated users access token
although i set the access token ..

Error in Refresh

Undefined property: stdClass::$user
Undefined property: stdClass::$access_token in instagram.class.php on line 507

any suggestions ?

Problem

Hello,
Sorry for disturbing you really.

But here's what I've done and it still doesn't work:
I tried with XAMPP, WAMP, UniServer and Apache Server with PHP

I got the same errors, I just can't get or doesn't get data from Instagram about the access token,
Could it be that it's my computer that doesn't reach or can't send the request?

If so please could you just tell me some solutions to this, it has gone many days and I'm on the same problem, I'd really appreciate it.

PS. I formatted my computer, and still got the same error, my ports are opened, and yesterday I tried your script on a webhosting, it works perfectly.

What is my problem, could you just give me some tips?

This error is from error.log
[Sun Nov 18 14:49:55.678713 2012] [:error] [pid 4256:tid 1140] [client 80.217.67.83:53654] PHP Notice: Trying to get property of non-object in C:\webserver\www\success.php on line 19

This error is from access.log
80.217.67.83 - - [18/Nov/2012:18:48:14 +0100] "GET /success.php?code=c66f485eeca4405392fd17392e953c77 HTTP/1.1" 200 124
80.217.67.83 - - [18/Nov/2012:18:48:15 +0100] "GET /favicon.ico HTTP/1.1" 404 209

Thank you for your time

Curl 7.10 and CURLOPT_SSL_VERIFYPEER

Hi,
Firstly thank you so much for this great work! For a few days I've been working with this class and had some issues with cURL calls. When I went and went deeper I found that the reason of my problems (returning false) is the paremeter CURLOPT_SSL_VERIFYPEER started to come as TRUE by the default as of cURL 7.10. So I suggest you to add the line below as default in the cURL call configs so that no one shall have any problem with this issue.

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

Regards!

modifyRelationship not working?

Hi, I've been using your instagram API and thanks for putting it up.

Now I'm working at the stage where I can follow/unfollow users.

However when I tried the simple example given

$instagram->modifyRelationship('follow', 1574083);

it doesn't work.

do you mind showing me how your modifyRelationship func works?

Cheers.

Pagination?

Hi, I've been working with your wrapper for a while now (thanks so much for it!) and I've been trying to figure out a pagination method but couldn't figure it out! the example you used in the docs don't work either... the $instagram->pagination()...

Any ideas?

_makeCall function should be public ?

I think this function should be public so we can add custom methods or override existing ones.

Here is an example I have used.

class InstagramOverride extends Instagram {
    public function getTagMedia($name,$params=null) {
        return $this->_makeCall('tags/' . $name . '/media/recent',false, $params);
    }
}

If I call the above code I will get an error
"Call to private method Instagram::_makeCall() from context InstagramOverride "

add optional $token parameter to methods

I think that having an optional $token param, in all the methods that may require it, would be awesome (eg. in a db-based app, with Instagram data->site registration and various calls per user and/or with different calls and methods in the same page).

keep getting foreach errors

Trying your example, i keep getting this on the popular page:

Warning: Invalid argument supplied for foreach() in /...../popular.php on line 29

Error: "This method requires an authenticated users access token"

Please help. I'm getting the message below when testing when testing "example/index.php"...

Fatal error: Uncaught exception 'Exception' with message 'Error: _makeCall() | users/self/media/recent - This method requires an authenticated users access token.' in /home/whychoos/public_html/feeds/master/src/Instagram.php:441 Stack trace: #0 /home/whychoos/public_html/feeds/master/src/Instagram.php(158): MetzWeb\Instagram\Instagram->_makeCall('users/self/medi...', true, Array) #1 /home/whychoos/public_html/feeds/master/example/success.php(35): MetzWeb\Instagram\Instagram->getUserMedia() #2 {main} thrown in /home/whychoos/public_html/feeds/master/src/Instagram.php on line 441

No JSON Data

For some reason, I don't seem to be getting any data put into the $jsonData, but it's all getting put into the $headerData. I'm also getting this exception:

( ! ) Notice: Undefined offset: 1 in C:\wamp\www\Insta\src\Instagram.php on line 448
Call Stack

Time Memory Function Location

1 0.0004 253312 {main}( ) ..\success.php:0
2 0.2117 419608 MetzWeb\Instagram\Instagram->getUserMedia( ) ..\success.php:35
3 0.2117 420648 MetzWeb\Instagram\Instagram->_makeCall( ) ..\Instagram.php:148

Any thoughts?

Call http_build_query with its third parameter

By default, http_build_query uses arg_separator.output as its third parameter, called $arg_separator.
In some cases, the value of arg_separator.output might not be & which is expected by CURL and breaks the request. For example a value of &amp; might have been set in order to make any output valid XHTML.

https://github.com/cosenary/Instagram-PHP-API/blob/master/instagram.class.php#L436
Could be rewritten as

$paramString = '&' . http_build_query($params, null, '&');

Errror when developing locally

Hi,

I've got the following error when testing a local script:

Error: _makeCall() - cURL error: Failed to connect to 173.252.114.3: Host is down

I've made sure the cURL options are set:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

But it makes no difference.

I'm using the open access option to get media.

$search_data = $instagram->getMedia('769610294212249053_13460080');

Copied to a live server this works fine.

Thanks for your help.

Jamie

Receiving: Notice: Undefined property: stdClass

This is my first time working with cosenary. So far, good. But when I try to autenticate access some private methods I receive "Notice: Undefined property: stdClass" when I call "setAccessToken". Here is some sample code:

getOAuthToken($code, true); $_SESSION['access_token'] = $token; $instagram->setAccessToken($token); ?>

Any help?

Thanks

How to access rate limit information

Hi guys,

I am currently using you lib in my site, very good lib to work with, is there a way to access the headers of the _makeCall() function in order to get the rate limit information (Instagram API Header X-Ratelimit-Remaining) this is ver important in my site in order to prevent SPAM abuse in all instagram features.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.