Yii Framework Forum: YouTube API v2.0 – Browser-based Uploading - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

YouTube API v2.0 – Browser-based Uploading Rate Topic: ***** 1 Votes

#1 User is offline   Vaibhav 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 23-August 12
  • Location:Berlin

Posted 29 August 2012 - 07:20 PM

Hi guys. Does anybody know how to use Yii to allow users to upload videos directly to youtube. Any extension for it ?

https://developers.g...based_uploading

I found this interesting tutorial... of how we can integrate Zend gdata. http://blogs.coldbuf...ing-youtube-api

How I would like to know how can I manage the routing options especially for this code given that I want the user to upload the video with other form elements.

 <?php
	$video = new Zend_Gdata_YouTube_VideoEntry();
	$video->setVideoTitle('YOUR VIDEO TITLE HERE');
	$video->setVideoDescription('YOUR VIDEO DESCRIPTION HERE');
	$video->setVideoPrivate();
	$video->setVideoCategory('YOUR VIDEO CATEGORY HERE');
	$video->SetVideoTags('YOUR VIDEO TAGS HERE');
	$handler_url	= 'http://gdata.youtube.com/action/GetUploadToken';
	$token_array	= $yt->getFormUploadToken($video, $handler_url);
	$token		= $token_array['token'];
	$post_url	= $token_array['url'];
	$next_url 	= 'YOUR NEXT YOUR URL';
 ?>

0

#2 User is offline   Vaibhav 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 23-August 12
  • Location:Berlin

Posted 30 August 2012 - 09:58 PM

I solved this issue. Also wrote a Wiki here for future reference.

http://www.yiiframew...ased-uploading/

Enjoy :-)



View PostVaibhav, on 29 August 2012 - 07:20 PM, said:

Hi guys. Does anybody know how to use Yii to allow users to upload videos directly to youtube. Any extension for it ?

https://developers.g...based_uploading

I found this interesting tutorial... of how we can integrate Zend gdata. http://blogs.coldbuf...ing-youtube-api

How I would like to know how can I manage the routing options especially for this code given that I want the user to upload the video with other form elements.

 <?php
	$video = new Zend_Gdata_YouTube_VideoEntry();
	$video->setVideoTitle('YOUR VIDEO TITLE HERE');
	$video->setVideoDescription('YOUR VIDEO DESCRIPTION HERE');
	$video->setVideoPrivate();
	$video->setVideoCategory('YOUR VIDEO CATEGORY HERE');
	$video->SetVideoTags('YOUR VIDEO TAGS HERE');
	$handler_url	= 'http://gdata.youtube.com/action/GetUploadToken';
	$token_array	= $yt->getFormUploadToken($video, $handler_url);
	$token		= $token_array['token'];
	$post_url	= $token_array['url'];
	$next_url 	= 'YOUR NEXT YOUR URL';
 ?>


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users