Giter VIP home page Giter VIP logo

django-facebook's People

Contributors

aidanlister avatar ash211 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

django-facebook's Issues

Error importing middleware django_facebook

I used pip to install django-facebook. I have the following settings:

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django_facebook.middleware.FacebookMiddleware',
):

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'south',
'feeds',
'login_feeds',
'readhistory',
'django_facebook',
)

I get this error when running the server:

ImproperlyConfigured: Module "django_facebook.middleware" does not define a "FacebookMiddleware" attribute/class

I also tried in shell:

windmaple@windmaple-VirtualBox:~/git/master$ ./manage.py shell
No handlers could be found for logger "django_facebook.models"
Python 2.7.5+ (default, Sep 19 2013, 13:49:51)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

from django_facebook import middleware
middleware.FacebookMiddleware
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'FacebookMiddleware'

What am I doing wrong?

Error importing middleware django_facebook

I get this error

Error importing middleware django_facebook.middleware: "No module named facebook"

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django_facebook.middleware.FacebookMiddleware',
)

Way to Prevent Repeated Auth Calls for Facebook User?

I notice that for a currently logged in facebook user, every request to the server (whether for an entire new page or just for a part of a page such as a gif), we trigger process_request in middleware.py. Because we:

  1. have a valid facebook cookie
  2. request.user is anonymous

This then authenticates the user in the backend and sets request.user = user. Upon a new GET request to the server, we recognize request.user = anonymous once again and repeat the process.

Is there a convenient way to avoid repeated calls to the authentication backend and save request.user = user per page load? I'd imagine I can set some extra session variable so that I don't repeatedly need to call the auth framework, but is there a better way to have the fact that the user is logged in via facebook and request.user persist?

Let me know if that doesn't make sense.

Authenticate method call all time

Hi,

I changed the FacebookMiddleware to call auth.login() method instead to set request.user with the user variable, because all time that the view is loaded the authenticate method is call again.

I hope helped :)

No License specified

Hey,

could you please add a LICENSE file so it's obvious how one can use your project?

Cheers,
Pascal

import facebook issue

When I follow your installation I got this error 'module' object has no attribute 'get_user_from_cookie' any help please?

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.