通过SDK连接到ActiveCollab会引发错误



我正试图连接到我们的云帐户,但我收到以下错误:

致命错误:未捕获错误:在/www/htdocs/asdf/asdf.org/example-Cloud.php中找不到类"ActiveCollab\SDK\Authenticator\Cloud":13堆栈跟踪:在第13行的/www/htdocs/asf/asdf.org/example-cloudphp中抛出#0{main}

require_once('https://app.activecollab.com/xxxxxx/autoload.php');
// Provide name of your company, name of the app that you are developing, your email address and password.
$authenticator = new ActiveCollabSDKAuthenticatorCloud('xxx', 'My Awesome Application', 'vvv@ghf.de', '123qwe123*');
// Show all Active Collab 5 and up account that this user has access to.
print_r($authenticator->getAccounts());
// Show user details (first name, last name and avatar URL).
print_r($authenticator->getUser());
// Issue a token for account #123456789.
$token = $authenticator->issueToken('123456789');
// Did we get it?
if ($token instanceof ActiveCollabSDKTokenInterface) {
print $token->getUrl() . "n";
print $token->getToken() . "n";
} else {
print "Invalid responsen";
die();
}

我做错了什么?

代码示例中的第一行不好。在继续之前,您应该查看有关Composer基本用法的文章:https://getcomposer.org/doc/01-basic-usage.md

一旦您在开发环境中正确设置了Composer、所需的ActiveCollab SDK和更新的依赖项,您的第一行很可能是这样的:

require __DIR__ . '/vendor/autoload.php';

但是你说:安装如果你选择用Composer安装这个应用程序,而不是下拉git存储库,你需要在你想下拉存储库的位置添加一个Composer.json文件:

所以我试着撤下存储库——或者我错了。。。https://github.com/activecollab/activecollab-feather-sdk

相关内容

  • 没有找到相关文章

最新更新