def METHOD_NAME(self, *args, **kwargs):
    """Returns user, might be logged in"""
    if 'code' in self.data:
        url = FACEBOOK_ACCESS_TOKEN_URL + '?' + \
              urlencode({'client_id': self.FACEBOOK_APP_ID,
                            'redirect_uri': self.redirect_uri,
                            'client_secret': self.FACEBOOK_API_SECRET,
                            'code': self.data['code']})
        response = cgi.parse_qs(urlopen(url).read())
        access_token = response['access_token'][0]
        data = self.user_data(access_token)
        if data is not None:
            if 'error' in data:
                error = self.data.get('error') or 'unknown error'
                raise ValueError('Authentication error: %s' % error)
            data['access_token'] = access_token
            # expires will not be part of response if offline access
            # premission was requested
            if 'expires' in response:
                data['expires'] = response['expires'][0]
        kwargs.update({'response': data, FacebookBackend.name: True})
        return authenticate(*args, **kwargs)
    else:
        error = self.data.get('error') or 'unknown error'
        raise ValueError('Authentication error: %s' % error)