public static function getInstance($key)
    {
        if (isset(self::$instances[$key])) {
            return self::$instances;
        }

        $config = TwitterOAuth::getConfig()->get($key, false);

        if (!$config) {
            throw new TwitterOAuthException('Unable to read "TwitterOAuth.' . $key . '" configuration.');
        }

        if (strpos($config->RedirectUri, 'http://') !== false || strpos($config->RedirectUri, 'https://'
            ) !== false
        ) {
            $redirectUri = $config->RedirectUri;
        } else {
            $redirectUri = self::httpRequest()->getCurrentUrl(true)->setPath($config->RedirectUri)->setQuery('')->val();
        }

        $instance = \Webiny\Component\TwitterOAuth\Bridge\TwitterOAuth::getInstance($config->ClientId,
                                                                                    $config->ClientSecret, $redirectUri
        );

        return new TwitterOAuth($instance);
    }