'Get an access token from the "code" returned from an OAuth dialog.
Returns a dict containing the user-specific access token and its
expiration date (if applicable).'

def get_access_token_from_code(self, code, redirect_uri, app_id, app_secret):

    args = {'code': code, 'redirect_uri': redirect_uri, 'client_id': app_id, 'client_secret': app_secret}
    return self.request('{0}/oauth/access_token'.format(self.version), args)
