This is a module for the MagicMirror2 for displaying your Instagram photos and comments on your MagicMirror2. It makes use of the new Facebook Instagram Graph API.
This Getting Started guide from Facebook will show you how to setup the App for instagram access. Just follow steps 1, 2 and 3 to get the variables you need.
From the app settings you will need:
Install openssl:
sudo apt-get install openssl
Create Certs:
cd ~/MagicMirror/config
mkdir ssl
openssl req -new -x509 -days 365 -nodes -out ./ssl/magicmirror.pem -keyout ./ssl/magicmirror.key
Update Config File:
nano config.js
Update the following:
useHttps: true, // Support HTTPS or not, default "false" will use HTTP
httpsPrivateKey: "/home/pi/MagicMirror/config/ssl/magicmirror.key", // HTTPS private key path, only require when useHttps is true
httpsCertificate: "/home/pi/MagicMirror/config/ssl/magicmirror.pem", // HTTPS Certificate path, only require when useHttps is true
modules
folder and execute git clone https://github.com/AlexanderSalter/MMM-Instagram2020.git
. A new folder with the name 'MMM-Instagram2020 will be created, navigate into it.npm install
to install the node dependencies.Option | Description |
---|---|
client_id |
Facebook Instagram App ID required for the Facebook Instagram APP. Type: string This value is REQUIRED |
client_secret |
Client Secret required for the Facebook Instagram APP. Type: string This value is REQUIRED |
redirect_uri |
Valid OAuth Redirect URI required for the Facebook Instagram APP. This should be set to https://[IP Of Your Magic Mirror]:8080/MMM-Instagram2020/auth Type: string This value is REQUIRED and neets HTTPS to be active on your Magic Mirror Installation |
animationSpeed |
How long for the animation to last when moving to the next image. Type: integer |
updateInterval |
How long before refreshing image. Type: integer |
Example config.js
entry:
{
module: 'MMM-Instagram2020',
position: 'top_left',
header: 'MMM-Instagram2020',
config: {
client_id: '<YOUR FACBOOK INSTAGRAM APP ID>', // Facebook Instagram App ID
client_secret: '<YOUR FACBOOK INSTAGRAM APP SECRET>', // Facebook Instagram App Secret
redirect_uri: '<YOUR FACEBOOK INSTAGRAM APP OAUTH REDIRECT URL', // Facebook Instagram App oauth_redirect_uri
animationSpeed: 1000,
updateInterval: 30000,
}}
+ Note: The mouse pointer may be hidden, just right-click to locate your pointer.
Note: The authorisation process uses a key stored in accesstoken.cfg
under the module directory.
This allows access to the account for 60 days.
There is a mechanism in place to renew the key every time MagicMirror2 is restarted.
If the access token gets to old, the interface will return to the authorisation link state.
This project is licensed under the MIT License - see the LICENSE.md file for details
?__a=1