def get_token(client_id, client_secret, client_access_token, page=None):
payload = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': client_id,<EOL>'<STR_LIT>': client_secret,<EOL>}<EOL>if client_access_token:<EOL><INDENT>payload['<STR_LIT>'] = '<STR_LIT>'<EOL>payload['<STR_LIT>'] = client_access_token<EOL><DEDENT>response = requests.post(<EOL>'<STR_LIT>',<EOL>params=payload)<EOL>access_token = response.json()['<STR_LIT>']<EOL>return access_token<EOL>
See: http://nodotcom.org/python-facebook-tutorial.html