problem on a page where i get a token , but i would like to do that on
another place (in a controller) but i fail at the moment to exec
$video->getEditLink()->getHref();.
I think it's because i don't have anymore permission in my controller,
to do that, i send the sessionToken that i generated previously in my
view, and i use it again (in my controller).
Apparently this method is not working.
Let's see some code:
In my view (That's work):
$sessionToken =
Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']);
$httpClient = Zend_Gdata_AuthSub::getHttpClient($sessionToken);
$yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId,
$developerKey);
$videoFeed = $yt-
>getUserUploads($userName);
foreach($videoFeed as $video)
{
$description = $video-
>getVideoDescription();
$video-
>setVideoDescription($description);
$Url = $video->getEditLink()-
>getHref();
$yt->updateEntry($video,
$putUrl);
In my controller ($video->getEditLink()->getHref() fail)
$sessionToken = $_POST['sessionToken'] (this one i used on my view
just before)
$httpClient = Zend_Gdata_AuthSub::getHttpClient($sessionToken);
$yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId,
$developerKey);
$videoFeed = $yt-
>getUserUploads($userName);
foreach($videoFeed as $video)
{
$description = $video-
>getVideoDescription();
$video-
>setVideoDescription($description);
$Url = $video->getEditLink()->getHref(); /
*FAIL*/
$yt->updateEntry($video, $putUrl);
thanks for help !
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment