был рабочий скрипт, который через zend классы добавлял события в гугл календарь вдруг перестало работать, зашел в профиль и обнаружил кучу сообщений Попытка входа из приложения или с устройства заблокирована сама ошибка скрипта Uncaught exception 'Zend_Gdata_App_AuthException' with message 'Authentication with Google failed. Reason: BadAuthentication' решил погуглить, но ничего по теме найти не смог вот класс, который я где то нарыл в какой то статье Код (Text): require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gdata_AuthSub'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); Zend_Loader::loadClass('Zend_Gdata_Calendar'); class GCAlerter { public $gcCalendar; public $gcTimeCorrect; public function __construct($time) { $client = Zend_Gdata_ClientLogin::getHttpClient('логин@gmail.com', 'пароль', Zend_Gdata_Calendar::AUTH_SERVICE_NAME); $this->gcCalendar = new Zend_Gdata_Calendar($client); $this->gcTimeCorrect = $time * 60; } public function alert($text) { $quickAddText = "$text ".date("H:i",time() + $this->gcTimeCorrect); $event = $this->gcCalendar->newEventEntry(); $event->content = $this->gcCalendar->newContent($quickAddText); $event->quickAdd = $this->gcCalendar->newQuickAdd('true'); $newEvent = $this->gcCalendar->insertEvent($event); $this->setReminder($newEvent); return $newEvent->id->text; } public function setReminder($event, $minutes=1) { $method = "sms"; $times = $event->when; foreach ($times as $when) { $reminder = $this->gcCalendar->newReminder(); $reminder->setMinutes($minutes); $reminder->setMethod($method); $when->setReminders(array($reminder)); } $eventNew = $event->save(); return $eventNew; } } какие будут идеи? если менять то на что?
Код (Text): $client = Zend_Gdata_ClientLogin::getHttpClient('логин@gmail.com', 'пароль', Zend_Gdata_Calendar::AUTH_SERVICE_NAME); а ты уверен что здесь все доступы правильно ввел? Если уверен, то советую зайти в API Google и посмотреть, может они поменяли вид аутентификации
доступы конечно же правильные с доступом я смотрел но ничего не понимаю вроде гугл дает отлуп левым приложениям, которые пытаются логинится а как отключить- не нахожу