def main(callback_inter=None, callback_final=None):
    """ this is called once (with no params) when the user clicks 'log in',
    and again (with params) when they click though the callback landing url """
    if (callback_inter and callback_final):        
        request_token, request_token_secret = json.loads(callback_inter)
        verifier = urlparse.parse_qs(callback_final)['oauth_verifier']
        print(json.dumps(access(request_token, request_token_secret, verifier)), end='')
    else:
        print(json.dumps(authorize()), end='')
        exit(4) # indicates to PopClip that a callback will follow
dataset/ETHPy150Open pilotmoon/PopClip-Extensions/source/Trello/auth.py/main/original