This MagicMirror module is a twitter follower counter.
- Go to the MagicMirror modules folder
cd ~/MagicMirror/modules
- Clone this repository
git clone https://github.com/ngnijland/MMM-social-counter.git
- Add this module to the modules array in the MagicMirror
config/config.js
file, like this:
modules: [
{
module: "MMM-social-counter",
position: "middle_center"
}
]
To show the follower count of a Twitter user you need an app in the Twitter Developer Portal.
-
Log into your Twitter account
-
Go to the apps overview in the
Developer Portal
(https://developer.twitter.com/en/portal/projects-and-apps) -
Create a new app
-
Add the
API key
andAPI key secret
to the config of this module as follows:
modules: [
{
module: "MMM-social-counter",
position: "middle_center",
config: {
twitter: {
apiKey: '<YOUR API KEY>',
apiKeySecret: '<YOUR API KEY SECRET>',
username: '<TWITTER USERNAME TO SHOW FOLLOWER COUNT OF>'
}
}
}
]
Configure this module in your MagicMirror config file which is located at config/config.js
in the MagicMirror repository. An example config for this module:
modules: [
{
module: "MMM-social-counter",
position: "middle_center",
config: {
// Options
}
}
]
The following configurations are available:
Config | Type | Default value | Description |
---|---|---|---|
size |
small | medium | large |
medium |
The size of the counter |
icon |
string |
fa-twitter |
The name of the font (from FontAwesome) to use as the icon next to the follower count, e.g. fa-twitter-square |
updatesEvery |
number |
10 |
The number of seconds between each follower count update |