Just started digging into the PHP API on YouTube and got a browser-based download of the Zend script. However, I can’t find the documentation on how to get the status of the video after downloading it. The main reason I need this is error handling - I need to know if the video is approved on YouTube, as someone can technically upload an image or file is too large. I need to know that vid has been approved so that I know what message the end user displays when they return to the site (i.e. "Your live video" or "Video upload error").
YouTube browser-based loading in PHP returns the status of the URL parameter 200, even if the format or size is incorrect, which of course does not help. Any ideas on how else to get this information from the YT object?
In general, when a user returns to the site, I want to be able to create a YT object based on their specific video ID and I want to be able to confirm that it was not rejected. I use ClientLogin to launch YouTube obj:
$authenticationURL= 'https://www.google.com/accounts/ClientLogin';
$httpClient = Zend_Gdata_ClientLogin::getHttpClient(
$username = 'myuser@gmail.com',
$password = 'mypassword',
$service = 'youtube',
$client = null,
$source = 'MySource',
$loginToken = null,
$loginCaptcha = null,
$authenticationURL);
Any thoughts?
source
share