nukopy / twistats

TwiStats is the application which visualizes Twitter-user's data.

Home Page:https://twistats.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TwiStats

This repository is a tutorial for Twitter REST API.

You may use Git to clone the repository from GitHub and install it manually:


how to use

For using twipy, you need to register Twitter Application for OAuth sertification. After you did, you can use twipy.

prepare API key

After you got API key, you should have 4 types of keys:

  • CONSUMER_KEY
  • CONSUMER_SECRET
  • ACCESS_TOKEN
  • ACCESS_SECRET

You need these keys when you use twipy for generate API instance. In the following, .

config.ini

[OAuth]
CONSUMER_KEY = **********
CONSUMER_SECRET = **********
ACCESS_TOKEN = **********
ACCESS_SECRET = **********
from configparser import ConfigParser

config = ConfigParser()
config.read('config.ini')
section = 'OAuth'
CK = config.get(section, 'CONSUMER_KEY')
CS = config.get(section, 'CONSUMER_SECRET')
AT = config.get(section, 'ACCESS_TOKEN')
AS = config.get(section, 'ACCESS_SECRET')
api = twipy(CK, CS, AT, AS)

or

import config

api = twipy(CS, CS, AT, AS)

or

import os

About

TwiStats is the application which visualizes Twitter-user's data.

https://twistats.herokuapp.com/


Languages

Language:CSS 71.3%Language:Python 19.0%Language:HTML 9.7%