def parse_raw_token(self, raw_token):
        "Parse token and secret from raw token response."
        if raw_token is None:
            return (None, None)
        # Load as json first then parse as query string
        try:
            token_data = json.loads(raw_token)
        except ValueError:
            qs = parse_qs(raw_token)
            token = qs.get('access_token', [None])[0]
        else:
            token = token_data.get('access_token', None)
        return (token, None)