Youtube API:将视频上传到特定频道 [英] Youtube API : Upload videos to a specific channel

查看:51
本文介绍了Youtube API:将视频上传到特定频道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 PHP(CodeIgniter 框架).

I'm using PHP (CodeIgniter framework).

我正在进行的项目将让用户将视频上传到服务器.还需要将视频上传到特定帐户(网站的帐户)下的 Youtube.我知道这不是推荐的做法,但这是理想的方法,因为大多数用户没有 Gmail 帐户.

The project I'm working on will let users upload videos to server. It is required that the video is also uploaded to Youtube under a specific account (the site's). I'm aware that this is not the recommended practice but it's the ideal way to go since most of the users don't have gmail account.

我一直在阅读 Youtube 的文档,但很快就被搞糊涂了.任何人都可以逐步解释实现我想要做的事情吗?根据我的想法,我的网站需要一个长期访问令牌,当用户完成上传时,我将使用这个长期访问令牌调用 Youtube API 将其上传到我网站的 Youtube 频道.但是不知道Youtube API 是否支持这个.

I've been reading Youtube's documentation, but got confused real quick. Can anyone explain the step-by-step to achieve what I want to do? From what I'm thinking, I need a long-lived access token for my site and when user finishes uploading, I will call Youtube API with this long-lived access token to upload it to my site's Youtube channel. But I don't know whether Youtube API supports this or not.

我找到了这个库:CI Youtube Library 但从我读到的内容来看,这个库还要求我的网络用户使用他们的 Youtube 帐户登录,所以我想这不是我想要的.

I've found this library : CI Youtube Library but from what I read, this library also requires my web user to log in with their Youtube account, so I guess it's not what I'm looking for.

感谢您的帮助!

推荐答案

  • 建议的方法是让您的用户使用他们的帐户上传,然后您审核进入您帐户的内容.否则,他们可能会上传令人反感的非法视频,而您可能不得不为此承担责任.这与公开分享您的密码没有什么不同.
  • 上传也有配额限制,如果您尝试从同一帐户上传,您会很快达到这些限制.
  • 他们不需要gmail"帐户,通过使用身份验证,他们只需将任何帐户快速链接到 Google 帐户即可.出于安全原因,没有长期存在的令牌.如果出现不需要的访问,短期令牌更安全.
  • 您可以在https://developers.google 获取所有其他信息.com/youtube/v3/getting-started"

    这篇关于Youtube API:将视频上传到特定频道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆