Failed to update token
I have tested Zend Gdata 1.10.1 on my localhost. I downloaded Zend Gdate from this link: http://framework.zend.com/download/webservices
Inside the Zend Gdata zip file, a folder named demos appeared. I extracted it and used YouTudeVideoApp to upload a sample video to Youtube.
But every time after I logged into Youtube, before it redirected me to my localhost, I got a warning message like this warning message:
localhost: This site is registered with Google to do request authorization, but is not configured to send requests securely. We recommend continuing the process only if you trust the following destination: localhost: 8080 / YouTube / operations.php
So, I was looking for a question on how to solve the problem of getting this warning when I saw some people prefer to change the value of $ secure to True in operation.php. Here is the script mentioned:
function generateAuthSubRequestLink($nextUrl = null)
{
$scope = 'http://gdata.youtube.com';
$secure = true;
$session = true;
if (!$nextUrl) {
generateUrlInformation();
$nextUrl = $_SESSION['operationsUrl'];
}
$url = Zend_Gdata_AuthSub::getAuthSubTokenUri($nextUrl, $scope, $secure, $session);
echo '<a href="' . $url
. '"><strong>Click here to authenticate with YouTube</strong></a>';
}
After I changed the value of $ secure to True, I found that the warning message changed to the following:
localhost: Registered, secure. This site is registered with Google to make authorization requests
The new warning message is somewhat shorter and looks better than the previous warning message. But as soon as I clicked the "Allow Access" button, it turned out to be the following:
ERROR - token update for Error CI3M6_Q3EOGkxoL -_____ wEYjffToQQ: Token update failed. Cause: Invalid AuthSub header. Error 401 ERROR - Unknown search type - ''
I don't know why this happened.
Could you help me solve the problem?
a source to share