

The thumbnail image URL, this is only returned if the media_type is VIDEO. If the media_type is VIDEO, this will be a link to a video file. If the media_type is IMAGE or CAROUSEL_ALBUM, this will be a link to an image. The username of the account that made the post. You can pass this value to request the next set of posts.Įach Instagram post object will contain the following properties. The 'after' page cursor returned from the API. The table below lists all properties attached to each Instagram post object.Ī count of the total number of posts the API returned. The instafeed() function will return the following values if the request was successful. More Information on Cursor-Based Pagination.By passing an 'after' page cursor, you're telling the API to return posts that come after the last post returned in a previous request. An error will be thrown if you attempt to request more than 25 posts.Īn 'after' page cursor from a previous request that points to the end of the 'page' of data that was returned. The number of posts you want to fetch, the default value is 25, and the API will only return a maximum of 25 posts per request. OptionĪ long-lived User Access Token for the Instagram account you want to fetch the posts for. The instafeed() function accepts an object of options as it's only parameter. The instafeed() function makes a request to the /me/media endpoint of the Instagram Graph API.
#Instafeed js height install#
Npm install instafeed-node-js Basic Usage Please be sure to update this value in the code snippets to correctly reference the variable for your User Access Token. Therefore, the code snippets below assume your User Access Token is stored in _user_access_token.

Note: It is highly recommended that you store User Access Tokens in an environment variable.
#Instafeed js height how to#
A User Access Token will allow you to fetch only the Instagram posts from the account it was generated for.įor more information about how to obtain a User Access Token, see: Basic Display API Overview Table of Contents To use this module, it is recommended that you obtain a long-lived User Access Token from the User Token Generator tool in the Facebook Developers Console. This node.js module allows you to asynchronously fetch posts from the Instagram Graph API with a long-lived User Access Token.
