0

I am trying to integrate my website to facebook and started with django-socialregistration. All goes fine when i add

{% load facebook %}
{% facebook_button %}

Now when I click the facebook button from browser, I am redirected to mysite.com/social/facebook/redirect/ I get the following error:

<socialregistration.contrib.facebook.client.Facebook object at 0x2b31a10> is not JSON serializable

I don't know why I get this error. And when I tried including {% facebook_js %} after the facebook_button tag, i get an invalid tag error for facebook_js.

In my settings.py,

FACEBOOK_REQUEST_PERMISSIONS = 'email'

I just want the email of the facebook id. What is it that I have to do? Even if this error clears, how do i retrive the email from the returned object?

Aswin Murugesh
  • 10,831
  • 10
  • 40
  • 69

1 Answers1

2

Found the error at last. Had to add this line to my settings.py

SESSION_SERIALIZER='django.contrib.sessions.serializers.PickleSerializer'
Aswin Murugesh
  • 10,831
  • 10
  • 40
  • 69