J3nnings J3nnings - 2 months ago 7
PHP Question

How can I get the date a video was uploaded through the Youtube API?

I'm confused as to where I can find the date a youtube video was uploaded. I've been using the following two functions:

$videoEntry->getUpdated()->getText();
$videoEntry->getVideoRecorded()


The first is when the video was last updated, and I'm not so sure that is the same as when it was uploaded.
The "video recorded" is not always present. I assume its taken from camera metadata.

I need the date it was uploaded to the youtube website. Thanks.

Answer

I was actually hoping for an answer through the PHP API specifically. None of the functions in the documentation were working, though I was able to get the date uploaded from PHP like so:

$videoEntry->mediaGroup->uploaded->text