'Returns a token from something like:
oauth_token_secret=xxx&oauth_token=xxx'

def from_string(s):

    params = cgi.parse_qs(s, keep_blank_values=False)
    key = params['oauth_token'][0]
    secret = params['oauth_token_secret'][0]
    token = OAuthToken(key, secret)
    try:
        token.callback_confirmed = params['oauth_callback_confirmed'][0]
    except KeyError:
        pass
    return token
