

def facebook_login(request, redirect_field_name='next', redirect_to_session_key='redirect_to'):
    '\n        1. access OAuth\n        2. set token to none\n        3. store and redirect to authorization url\n        4. redirect to OAuth authorization url\n    '
    access = OAuthAccess()
    token = None
    if hasattr(request, 'session'):
        logger.debug('la_facebook.views.facebook_login: request has session')
        request.session[redirect_to_session_key] = request.GET.get(redirect_field_name)
    return HttpResponseRedirect(access.authorization_url(token))

dataset/ETHPy150Open pydanny/django-la-facebook/la_facebook/views.py facebook_login/original