Application for storing Facebook Pages statistic for different timesnaps
Project description
# Django Facebook Pages Statistic
[![Build Status](https://travis-ci.org/ramusus/django-facebook-pages-statistic.png?branch=master)](https://travis-ci.org/ramusus/django-facebook-pages-statistic) [![Coverage Status](https://coveralls.io/repos/ramusus/django-facebook-pages/badge.png?branch=master)](https://coveralls.io/r/ramusus/django-facebook-pages-statistic)
Application for storing Facebook Pages statistic (likes and talking_about counters) for different timesnaps
## Installation
pip install facebook-pages-statistic
Add into `settings.py` lines:
INSTALLED_APPS = (
...
'taggit',
'oauth_tokens',
'facebook_api',
'facebook_pages',
'facebook_pages_statistic',
)
# oauth-tokens settings
OAUTH_TOKENS_HISTORY = True # to keep in DB expired access tokens
OAUTH_TOKENS_FACEBOOK_CLIENT_ID = '' # application ID
OAUTH_TOKENS_FACEBOOK_CLIENT_SECRET = '' # application secret key
OAUTH_TOKENS_FACEBOOK_SCOPE = ['offline_access'] # application scopes
OAUTH_TOKENS_FACEBOOK_USERNAME = '' # user login
OAUTH_TOKENS_FACEBOOK_PASSWORD = '' # user password
## Usage examples
After fetching Facebook Page from [django-facebook-pages application](https://github.com/ramusus/django-facebook-pages)
automaticaly in background PageStatistic instance will be created which store last likes_count, talking_about_count and current update time
>>> page = Page.remote.fetch('19292868552')
>>> stat = page.statistics.latest()
>>> stat.likes_count
10
>>> stat.talking_about_count
20
>>> stat.updated_at
datetime.datetime(2014, 10, 28, 15, 12, 16, 128099, tzinfo=<UTC>)
[![Build Status](https://travis-ci.org/ramusus/django-facebook-pages-statistic.png?branch=master)](https://travis-ci.org/ramusus/django-facebook-pages-statistic) [![Coverage Status](https://coveralls.io/repos/ramusus/django-facebook-pages/badge.png?branch=master)](https://coveralls.io/r/ramusus/django-facebook-pages-statistic)
Application for storing Facebook Pages statistic (likes and talking_about counters) for different timesnaps
## Installation
pip install facebook-pages-statistic
Add into `settings.py` lines:
INSTALLED_APPS = (
...
'taggit',
'oauth_tokens',
'facebook_api',
'facebook_pages',
'facebook_pages_statistic',
)
# oauth-tokens settings
OAUTH_TOKENS_HISTORY = True # to keep in DB expired access tokens
OAUTH_TOKENS_FACEBOOK_CLIENT_ID = '' # application ID
OAUTH_TOKENS_FACEBOOK_CLIENT_SECRET = '' # application secret key
OAUTH_TOKENS_FACEBOOK_SCOPE = ['offline_access'] # application scopes
OAUTH_TOKENS_FACEBOOK_USERNAME = '' # user login
OAUTH_TOKENS_FACEBOOK_PASSWORD = '' # user password
## Usage examples
After fetching Facebook Page from [django-facebook-pages application](https://github.com/ramusus/django-facebook-pages)
automaticaly in background PageStatistic instance will be created which store last likes_count, talking_about_count and current update time
>>> page = Page.remote.fetch('19292868552')
>>> stat = page.statistics.latest()
>>> stat.likes_count
10
>>> stat.talking_about_count
20
>>> stat.updated_at
datetime.datetime(2014, 10, 28, 15, 12, 16, 128099, tzinfo=<UTC>)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-facebook-pages-statistic-0.0.6.tar.gz
.
File metadata
- Download URL: django-facebook-pages-statistic-0.0.6.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f5e3e45a7ef4ca5c7599faf1177083f84bd1cfcca6b3b40cbc87d64b8e96135 |
|
MD5 | 00dc7fc5cfabd55f5a831535c8295b9d |
|
BLAKE2b-256 | d2a7c2dd6a4578ba8bac62413afb4f4be7a6f99c6c744e94d226d58985fa4d40 |