Instagram API
Instagram API can be used to build non-automated, authentic, high-quality demonstrative blocks.
Official documentation
For more detailed information and examples, see the official documentation: Instagram API .
How to use?
Wrap any block in a parent element with an ID or class and add the same ID in the JS init function of the hs.instagram.js
plugin and include the data-user-id
, data-client-id
and data-token
data attributes.
Copy-paste the following <script>
near the end of your pages under JS Implementing Plugins to enable it.
Copy-paste the following <script>
near the end of your pages under JS Front to enable it.
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
Objects
Quality of the images.
Valid values are:
thumbnail
(150x150)low_resolution
(306x306)standard_resolution
(612x612)
Default value is: thumbnail
Methods
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-user-id=""
.
Attributes | Description |
---|---|
|
A unique user ID. Use if data-get is set true . |
|
|
|
An ID obtained with the Instagram API. Required!. |
|
A valid oAuth token. Can be used in place of / along with the user ID. |
|
Determines which type of images to output. Valid values are:
user
|
|
Specifies the limit on the number of output images. |
|
A template element. |
|
Executes the code inside the body of the function each time it appears. |
|
Executes the code inside the body of the function each time it appears. |
|
Executes the code inside the body of the function if the plugin received the data. |
|
Executes the code inside the body if the images could not be loaded. |