5 thoughts on “Django Facebook Integration Using Pyfb

  1. hi ,i have problem

    i can’t set FACEBOOK_REDIRECT_URL=http://localhost:8000/pyfb/facebook_login_success

    browser return
    “error”: {
    “message”: “Invalid redirect_uri: \u61c9\u7528\u7a0b\u5f0f\u8a2d\u7f6e\u7121\u6cd5\u63a5\u53d7\u6b64\u500b\u7db2\u5740\u3002”,
    “type”: “OAuthException”

    but i set FACEBOOK_REDIRECT_URL=’http://www.facebook.com/’
    i can work

    Can u give me some advise?

    • Oh, I fought with that before.

      Try settings the REDIRECT_URI to ‘http://localhost:8000/pyfb/facebook_login_success/’
      Note the ending bar ‘/’. Facebook only accepts that kind of urls.


  2. Thanks for the simple code ,
    is there a code to logout ?
    is there a decorator like @facebook_login_required? How do I check if loggedin ?

    • Hey, Sorry for the delayed response.

      We don’t implement decorators to add support for login checking on django. But I’d recommend to use the django auth mechanism within pyfb.
      That way you can login/logout a user into the django auth backend when he login/logout through facebook.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s