django-social-auth for Facebook is redirecting home and not logging in

Posted by Scott Rogowski on Stack Overflow See other posts from Stack Overflow or by Scott Rogowski
Published on 2012-10-03T03:34:34Z Indexed on 2012/10/03 3:37 UTC
Read the original article Hit count: 283

I have had django-social-auth working for Google for quite some time now but am having problems with Facebook.

I am at the point where clicking on the /login/facebook/ link will take me to the Facebook authorization page. I then click "go to app" and it redirects me to my home page but does not log in or create a user but does put some strange "#=" onto the back of my URL.

Reading up on that, here https://developers.facebook.com/blog/post/552/, and here https://github.com/omab/django-social-auth/issues/199, it seems that would be happening if the redirect uri was not defined. However, on my facebook app settings, I have the following (replacing my site with example.com):
+ App Namespace: "example"
+ Site URL: "http://example.com/complete/facebook/"
+ Site Domain: "example.com"
+ Sandbox Mode: "On"
+ Post-Authorize Redirect URL: "http://apps.facebook.com/example/"
+ Deauthorize URL: "http://www.example.com/"
+ Post-Authorize URL: "http://example.com/complete/facebook/"

The request that django-social-auth is sending to facebook is (replacing my info again): "https://www.facebook.com/dialog/oauth?scope=email&state=*&redirect_uri=http%3A%2F%2Fexample.com%2Fcomplete%2Ffacebook%2F%3Fredirect_state%3D***&client_id=*"

The /complete/facebook/ is what is in the documentation and google works as /complete/google/

What am I missing here?

© Stack Overflow or respective owner

Related posts about django

Related posts about oauth