5

what is the correct way to load third-party components into Craft 3 plugin I'm developing?

I tried adding

$this->setComponents([
    'authClientCollection' => [
        'class' => '\yii\authclient\Collection',
        'clients' => [
            'twitter' => [
                'class' => '\yii\authclient\clients\Twitter'
            ],
            // etc.
        ],
    ]
]);`

to plugin's init() function, as well as parent::setComponents, but both produced same error:

Unknown component ID: authClientCollection

What am I doing wrong here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.