GithubHelp home page GithubHelp logo

marinho / django-facebook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tschellenbach/django-facebook

1.0 2.0 1.0 117 KB

Facebook open graph api implementation using the Django web framework in python

Home Page: http://www.mellowmorning.com/

License: GNU General Public License v3.0

django-facebook's Introduction

Django Facebook by Thierry Schellenbach (http://www.mellowmorning.com)

Login and registration functionality using the new facebook open graph api.

  • Actually creates user models and profiles
  • Robust facebook user data -> django account conversion

Required django apps

  • django.contrib.auth (Django core app, included)
  • django-registration

Additional dependencies

  • python-cjson

Implementation

Step 1 - Settings

Define the settings in django_facebook/settings.py in your settings.py file.

Step 2 - Url config

add

url(r'^facebook/', include('django_facebook.urls')),

to your global url.py file.

Step 3 - Ensure the FB JS api is available on all pages you want to login

Facebook JS API

Step 4 - Update your models

Add to your user profile model

about_me = models.TextField(blank=True, null=True)
facebook_id = models.IntegerField(blank=True, null=True)
facebook_name = models.CharField(max_length=255, blank=True, null=True)
facebook_profile_url = framework_fields.URLTextField(blank=True, null=True)
website_url = framework_fields.URLTextField(blank=True, null=True)
blog_url = framework_fields.URLTextField(blank=True, null=True)
image = models.ImageField(blank=True, null=True)
date_of_birth = models.DateField(blank=True, null=True)

Step 5 - Template

See examples/connect.html.

For more details, see the Facebook docs.

django-facebook's People

Contributors

tschellenbach avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.