Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-facebook-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-facebook-api

Django implementation for Facebook Graph API

  • 0.6.8
  • PyPI
  • Socket score

Maintainers
1

Django Facebook Graph API

PyPI version Build Status Coverage Status

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. Please see the library's individual files for more information.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc