Skip to main content

Django implementation for Facebook Graph API

Project description

Django Facebook Graph API
=========================

[![PyPI version](https://badge.fury.io/py/django-facebook-api.png)](http://badge.fury.io/py/django-facebook-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.api import api_call
>>> api_call('4')
{u'first_name': u'Mark',
u'id': u'4',
u'last_name': u'Zuckerberg',
u'link': u'https://www.facebook.com/app_scoped_user_id/10101334100533631/',
u'name': u'Mark Zuckerberg',
u'updated_time': u'2015-09-29T14:42:17+0000'}

>>> api_call('4', fields='id,name')
{u'id': u'4', u'name': u'Mark Zuckerberg'}

Licensing
---------

This library uses the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
Please see the library's individual files for more information.

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

django-facebook-api-0.6.5.tar.gz (29.2 kB view details)

Uploaded Source

File details

Details for the file django-facebook-api-0.6.5.tar.gz.

File metadata

File hashes

Hashes for django-facebook-api-0.6.5.tar.gz
Algorithm Hash digest
SHA256 1ab4878c6ce0b133f56abf1ac091928b71af80fe7f731bd068d360878b4709c0
MD5 2e6f7ca3936102be33cb8d108878dc25
BLAKE2b-256 4f0026897148c33d70fb0d673c5cdada511a1e0763b17f895a28a27c48513e09

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page