plouc / mozaik-ext-twitter

Mozaïk twitter widgets
MIT License
4 stars 3 forks source link

Mozaïk twitter widgets

Travis CI NPM version

Twitter Client Configuration

In order to use the Mozaïk twitter widgets, you must configure its client.

parameters

key description
consumerKey twitter consumer key
consumerSecret twitter consumer secret
accessTokenKey twitter access token key
accessTokenSecret twitter access token secret

usage

{
  //…
  api: {
    twitter: {
      consumerKey:       'xxxxx',
      consumerSecret:    'xxxxx',
      accessTokenKey:    'xxxxx',
      accessTokenSecret: 'xxxxx'
    }
  }
}

Twitter hashtags pie

twitter hashtags pie

Display a pie chart showing stats for a given list of hashtags

parameters

key required description
layout no layout (legends placement), can be top right bottom left, default is right
hashtags yes a list of hashtags with an associated color

usage

{
    type:     'twitter.hashtags_pie',
    layout:   'right',
    hashtags: [
        { color: '#6bc2c8', text: 'apple'      },
        { color: '#5f8cc0', text: 'google'     },
        { color: '#525487', text: 'twitter'    },
        { color: '#376aa2', text: 'facebook'   },
        { color: '#383b72', text: 'instagram'  }
    ],
    columns: 2, rows: 1, x: 0, y: 0
}