i am using zend three legged php api to grab user gmail email. when first i run three-legged.php
if (!isset($_SESSION['ACCESS_TOKEN'])) {
if (!isset($_SESSION['REQUEST_TOKEN'])) {
// Get Request Token and redirect to Google
$_SESSION['REQUEST_TOKEN'] = serialize($consumer->getRequestToken(array('scope' => implode(' ', $THREE_LEGGED_SCOPES))));
$consumer->redirect();
} else {
// Have Request Token already, Get Access Token
$_SESSION['ACCESS_TOKEN'] = serialize($consumer->getAccessToken($_GET, unserialize($_SESSION['REQUEST_TOKEN'])));
header('Location: ' . getCurrentUrl(false));
exit;
}
} else {
// Retrieve mail using Access Token
$accessToken = unserialize($_SESSION['ACCESS_TOKEN']);
its working fine. but when i store $accessToken into a txt file. which has the following contents.
oauth_token=1%2FYJGLd0cfd1R9VpDlZtP2yiznfzgBLrKgT7dIwBaJgM0&oauth_token_secret=nmtJx45vUP6u1_5nIGPQbg1v
in other file i am getting this access_token and setting as under
$accessToken = new Zend_Oauth_Token_Access();
$accessToken->setToken('1%2FYJGLd0cfd1R9dfdsfVpDlZtP2yizngBLrKgT7dIwBaJgM0');
$accessToken->setTokenSecret('nmtJx45vUP6u1_5dfnIGPQ1v');
this is giving me the exception.
PHP Fatal error: Uncaught exception 'Zend_Mail_Storage_Exception' with message 'cannot change folder, maybe it does not exist'
and other is
ext exception 'Zend_Mail_Storage_Exception' with message 'cannot select INBOX, is this a valid transport?
please help me how can resolve this.