pennersr/django-allauth — pull request #402 by marcofucci (2013-10-08 09:48:12+00:00)
Title: Fixes facebook response.status values and adds callback support for cancelUrl and errorUrl

response.status bugfix
---------------------------------

It seems that the ``notConnected`` status disappeared and now Facebook uses ``connected``, ``not_authorized`` and ``unknown`` as possible values https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/

In case of ``not_authorized`` and ``unknown``, the ``cancelUrl`` should be used.

Callbacks support
-------------------------

This pull request adds a new feature, that is the possibility to use a callback function for ``cancelUrl`` and ``errorUrl``.

In other words, you can create ``templates/facebook/fbconnect.html`` and use custom logic in case of facebook cancel or error:

{% load url from future %}
{% load staticfiles %}