Instagram is a growing platform to quickly share pictures with your friends.
With this classes you can connect to nearly all Instagram API Endpoints just by using JavaScript.
Polaroid Camera Icon by Petter Myhr
At first, you have to register a new client on the developer page of Instagram.
This library just requires the client id and if you use services that require authentication, also the callback url.
You have to use the Instagram.Base.js first. It's the base for all other files.
Use the other files as required.
If you just want to use the Media and Tags Endpoints, your code would look like
#HTML
<script src="js/Instagram.Base.js"></script>
<script src="js/Instagram.Media.js"></script>
<script src="js/Instagram.Tags.js"></script>
Syntax:
#JS
var myInstagram = new Instagram(options);
Arguments:
- options - (options) see below
Options:
- client_id - (string) Your applications client_id
- redirect_uri - (string) The defined callback URL of your application
- scope - (array) A list of scopes your application require - Take a look at the Instagram API description
Media API Endpoints Documentation
Syntax:
#JS
myInstagram.getMedia(media_id);
Arguments:
- media_id
Events
mediaInformation
Syntax:
#JS
myInstagram.searchMedia(lat, lng, distance, min_time, max_time);
Arguments:
- lat - Latitude of the center search coordinate. If used, lng is required.
- lng - Longitude of the center search coordinate. If used, lat is required.
- distance - Default is 1km (distance=1000), max distance is 5km
- min_time - A unix timestamp. All media returned will be taken later than this timestamp.
- max_time - A unix timestamp. All media returned will be taken earlier than this timestamp.
Events
mediaData
Syntax:
#JS
myInstagram.getPopularMedia();
Events
mediaData
Tag API Endpoints Documentation
Syntax:
#JS
myInstagram.getTagInformation(tag);
Arguments:
- tag - (string)
Events
tagInformation
Syntax:
#JS
myInstagram.getTagMedia(tag);
Arguments:
- tag - (string)
Events
mediaData
Syntax:
#JS
myInstagram.searchTag(input);
Arguments:
- input - (string)
Events
tagSearch
This Endpoints require and authorized user.
User API Endpoints Documentation
This Endpoints require and authorized user.
Relationship API Endpoints Documentation
This Endpoints require and authorized user.
Comment API Endpoints Documentation
This Endpoints require and authorized user.
Like API Endpoints Documentation