I want to let users to upload videos to YouTube using my account. It means that they visit my site, click on the button "Upload video", choose the file and it uploads to YouTube in my account. The users don't sign in their own accounts, they use my.
As I understood I have to use Using OAuth 2.0 for Web Server Applications. I have created on cloud.google.com new poject, in APIs chose Prediction API ON and YouTube Data API v3, register new app and got Certificate (SERVICE_ACCOUNT_NAME = EMAIL ADDRESS?). The Google APIs Client Library for PHP shows the error
Catchable fatal error: Argument 3 passed to Google_HostedmodelsServiceResource::predict() must be an instance of Google_Input, none given, called in /Volumes/information/data/Dima/Dropbox/web/domains/videocard.aspi/server.php on line 62 and defined in /Volumes/information/data/Dima/Dropbox/web/domains/videocard.aspi/libs/google-api-php-client/src/contrib/Google_PredictionService.php on line 36
And I don't understood is SERVICE_ACCOUNT_NAME = EMAIL ADDRESS in Certificate in cloud.google.com/console?
I don't know what to do, I have spent days to find the right way.
P.S. I can't use ZEND framework. Sorry for my poor English
Not sure, why you are trying to use Prediction API. It has nothing to do with uploads. Your error is coming from there.
Here are PHP samples: Resumable Upload Simple uploads
Besides, you can not let users upload into your own account. Through OAuth2, they can only upload to their account. And letting random users upload to your account wouldn't be a good solution anyways. That's why we created YouTube Direct Lite : which lets people upload into their account but sends videos to your playlist for your moderation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With