ryangittings / craft-instagram-feed
A simple plugin for pulling Instagram posts in your templates.
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2024-09-14 22:41:25 UTC
README
A plugin for Craft CMS that allows you to retrieve your Instagram feed.
Installation
Upload the instagramfeed/ directory to your plugins/ directory.
Go to plugins and install/enable Instagram Feed.
Next, go to settings and enter your Instagram user id and access token.
Usage
instagramfeed has two available methods for you to call.
getFeed(int $numberOfPostsToRetrieve)
returns a multidimensional array of your instagram posts. Each post has four elements you can access.
- link (the link to your instagram post)
- url (the url of the image)
- likes (the number of likes the post recieved)
- comments (the number of comments the post recieved)
{% for image in craft.instagramfeed.getFeed(8) %}
{{ image.link }}
{{ image.url }}
{{ image.likes }}
{{ image.comments }}
{% endfor %}
isConnected()
Returns true if Instagram Feed succesfully connected to your instagram account