You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for sharing your code for django/facebook connect integration. I am having a slight issue with authentication. I am using the views code to handle authentication that Michael Trosen posted in his slideshow:
I am passing a USER_LOGGED_IN variable to my templates which contains the user.is_authenticated variable.
My scenario is straightforward. I have a page that loads the facebook tags and uses {% show_facebook_button %}. On this page, I click on the Facebook Connect button to log in, which opens the Facebook Connect window. I enter my credentials, click the submit button, the window closes and I am returned to my own site. There is a momentary delay during which my page communicates with Facebook, and then I am logged in.
Once I am logged in it, it looks like everything is working properly. The problem occurs if I navigate away and navigate back to that page. I am logged out when I return to my page. It's quite annoying as it forces me to re-login. I would assume that the package has built in cookies to remember sessions. Any advice on what the problem is or how I can fix this?
Thanks, Adam
The text was updated successfully, but these errors were encountered:
You should start with setting up logging in settings.py - the app uses python logging. By default messages get logged to the console, but you will need to set logging to show debug messages. You should be able to see where you log in and where you're getting logged out.
If you've followed the readme, you should have django.contrib.sessions in your installed_apps. This is what tracks your authentication. It puts a cookie on your client. Make sure the xd_receiver.htm is being statically served, per the instructions. Make sure you're facebook app is setup correctly and you're typing in the domain exactly how it is saved in facebook (127.0.0.1:8000 is NOT the same as localhost:8000).
With that said, there are a few potential points of failure and facebook can be super flaky and will drop your sessions. It just shouldn't do it often. Let me know what you find in the logs, and if any of these quick checks helped.
Ryan,
Thanks for sharing your code for django/facebook connect integration. I am having a slight issue with authentication. I am using the views code to handle authentication that Michael Trosen posted in his slideshow:
http://www.slideshare.net/mrtrosen/lab305-django-facebook-connect-integration-example
I am passing a USER_LOGGED_IN variable to my templates which contains the user.is_authenticated variable.
My scenario is straightforward. I have a page that loads the facebook tags and uses {% show_facebook_button %}. On this page, I click on the Facebook Connect button to log in, which opens the Facebook Connect window. I enter my credentials, click the submit button, the window closes and I am returned to my own site. There is a momentary delay during which my page communicates with Facebook, and then I am logged in.
Once I am logged in it, it looks like everything is working properly. The problem occurs if I navigate away and navigate back to that page. I am logged out when I return to my page. It's quite annoying as it forces me to re-login. I would assume that the package has built in cookies to remember sessions. Any advice on what the problem is or how I can fix this?
Thanks, Adam
The text was updated successfully, but these errors were encountered: