public function oauth_authenticate($force_login = NULL, $screen_name = NULL, $type = 'authenticate')
  {
    if (! in_array($type, ['authenticate', 'authorize'])) {
      throw new \Exception('To get the ' . $type . ' URL, use the correct third parameter, or omit it.');
    }
    if ($this->_oauth_token === null) {
      throw new CodebirdCredentialsException('To get the ' . $type . ' URL, the OAuth token must be set.');
    }
    $url = self::$_endpoints['oauth'] . 'oauth/' . $type . '?oauth_token=' . $this->_url($this->_oauth_token);
    if ($force_login) {
      $url .= "&force_login=1";
    }
    if ($screen_name) {
      $url .= "&screen_name=" . $screen_name;
    }
    return $url;
  }