Django implementation for Facebook Graph API
Project description
# Django Facebook Graph API
[![Build Status](https://travis-ci.org/ramusus/django-facebook-api.png?branch=master)](https://travis-ci.org/ramusus/django-facebook-api) [![Coverage Status](https://coveralls.io/repos/ramusus/django-facebook-api/badge.png?branch=master)](https://coveralls.io/r/ramusus/django-facebook-api)
Application for interacting with Facebook Graph API objects using Django model interface
## Installation
pip install django-facebook-api
Add into `settings.py` lines:
INSTALLED_APPS = (
...
'oauth_tokens',
'facebook-api',
)
# 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
### Simple API Graph request
>>> from facebook_api.utils import graph
>>> graph('zuck')
Node(<Graph(u'https://graph.facebook.com/zuck') at 0xb1cbfac>,
{'first_name': 'Mark',
'gender': 'male',
'id': '4',
'last_name': 'Zuckerberg',
'link': 'http://www.facebook.com/zuck',
'locale': 'en_US',
'name': 'Mark Zuckerberg',
'updated_time': '2013-03-13T20:36:43+0000',
'username': 'zuck'})
>>> graph('zuck', fields='id,name')
Node(<Graph(u'https://graph.facebook.com/zuck') at 0xb1d2a8c>,
{'id': '4', 'name': 'Mark Zuckerberg'})
[![Build Status](https://travis-ci.org/ramusus/django-facebook-api.png?branch=master)](https://travis-ci.org/ramusus/django-facebook-api) [![Coverage Status](https://coveralls.io/repos/ramusus/django-facebook-api/badge.png?branch=master)](https://coveralls.io/r/ramusus/django-facebook-api)
Application for interacting with Facebook Graph API objects using Django model interface
## Installation
pip install django-facebook-api
Add into `settings.py` lines:
INSTALLED_APPS = (
...
'oauth_tokens',
'facebook-api',
)
# 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
### Simple API Graph request
>>> from facebook_api.utils import graph
>>> graph('zuck')
Node(<Graph(u'https://graph.facebook.com/zuck') at 0xb1cbfac>,
{'first_name': 'Mark',
'gender': 'male',
'id': '4',
'last_name': 'Zuckerberg',
'link': 'http://www.facebook.com/zuck',
'locale': 'en_US',
'name': 'Mark Zuckerberg',
'updated_time': '2013-03-13T20:36:43+0000',
'username': 'zuck'})
>>> graph('zuck', fields='id,name')
Node(<Graph(u'https://graph.facebook.com/zuck') at 0xb1d2a8c>,
{'id': '4', 'name': 'Mark Zuckerberg'})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-facebook-api-0.1.3.tar.gz
(11.8 kB
view details)
File details
Details for the file django-facebook-api-0.1.3.tar.gz
.
File metadata
- Download URL: django-facebook-api-0.1.3.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed8edffa8bd472215abc654a7e0498d69b3e8ca8792e1078594c0c3177b6fc10 |
|
MD5 | 499760fca003d314951b4d97d9288c5b |
|
BLAKE2b-256 | 5300403c6b0966d036321777ea72e85d5643b40bcb45fb0481efba26a5ecd5d3 |