At We Create Digital, we have a plugin that we use for connecting instagram to your website. WCD - Please download the instagram plugin from the repo and zip it up to be able to add this into the WordPress site.
Steps to activate plugin on a site
- Navigate to developers.facebook.com and create a new developer app.
- Ensure that the app is a Consumer app and attach the Instagram Basic Display as a service that you would like to use. Follow this guide for assistance with doing this.
- Generate an app key and app secret from the Instagram Basic Display
- Active the plugin
- Add the app key and app secret to the theme options within the site
- When you have activated the plugin in the WordPress site, you will see a red strip at the top of the page with a link that says "Generate access token for Instagram". Click on this link
- Providing that everything is set up on the facebook developers app correctly you should be redirected to the Instagram login. Login with the clients details and you will be redirected back to WordPress admin and the red strip will have gone
Please note that the tokens only last for 60 days. Every 60 days a new connection must be made and the token will refresh
There should be a cron task that is activated when you activate the plugin. This task is called
instagram_connect_refresh_access_token. The plugin has been created to run twice daily. Sometimes this does not complete and you need to reactivate the plugin to generate an access token again.
You must disable the cron scheduler in wordpress and activate the cron tasks on the server.
The feed is not working
This is generally because the token has expired and that you need to generate a new access token.
Steps to resolve
- Deactivate the plugin
- Reactivate the plugin
- Click the link "Generate access token for Instagram" and login to instagram. You will be redirected back to the WordPress Admin panel
You can use the shortcode
['wp-instagram-connect'] to be able to show the media.