嗨,我正在使用 contextIO api 获取电子邮件。我从 GitHub 获得了一个代码,但它显示了一些错误。我正在使用此代码,
include_once("class.contextio.php");
// see https://console.context.io/#settings to get your consumer key and consumer secret.
$contextIO = new ContextIO('asssasas','sdsd1111sdsdsd');
$accountId = null;
// list your accounts
$r = $contextIO->listAccounts();//print_r($r);
foreach ($r->getData() as $account) {
echo $account['id'] . "\t" . join(", ", $account['email_addresses']) . "\n";
if (is_null($accountId)) {
$accountId = $account['id'];
}
}
但它显示一个错误
Fatal error: Call to a member function getData() on a non-object
是否需要单独的 gmail 身份验证?任何人请帮助我