LiveWhale CMS connects to Instagram to pull images and captions from your account(s) into one or more Instagram widgets on your site.
Before you can do those things, though, you’ll need to setup a Instagram App in the Facebook App Tools, and then plug the Instagram App credentials into your LiveWhale configuration file.
Note: These instructions are updated as of March 2020 to comply with changes to the Facebook/Instagram API.
We use the new Instagram Basic Display API and User Token Generator to pull your posts. From the Facebook/Instagram docs (emphasis added).
The Instagram User Token Generator is a tool you can use to quickly generate long-lived Instagram User Access Tokens for any of your public Instagram accounts. This is useful if you’re testing your app and don’t want to bother with implementing the Authorization Window, or if you’re using copy and pasteable code supplied by a third-party service (for example, to display your own Instagram data on your own website).
The tool works by triggering the Authorization Window, which you can sign into with a public Instagram account that you have designated as a tester account. After signing in, the tool will generate a long-lived access token that you can copy and paste. Note that tokens can only be generated for public Instagram accounts.
To setup your account(s):
First, follow steps 1–3 on this page to create your app and assign your Instagram user(s) as test accounts.
Then, go to My Apps and click your App Name, then from the Dashboard find Products > Instagram > Basic Display
Once you login with your account(s) to approve the test access, you can click “Generate Token” to get an access token. Copy that token.
Edit livewhale/core/config.php to add the “INSTAGRAM” section to the Credentials array, replacing my_instagram_username
with your Instagram username and pasting in your access token in place of my_access_token
:
1 | $GLOBALS['LIVEWHALE_CONFIG']['CREDENTIALS']=[ |
To support multiple accounts, you can add additional lines to this area:
1 | $GLOBALS['LIVEWHALE_CONFIG']['CREDENTIALS']=[ |
With those changes saved, you can now login and create/edit an Instagram widget for each username you added in the above steps.