使用HybridAuth和PHP将视频上传到Youtube频道

时间:2013-02-25 14:44:24

标签: php youtube-api hybridauth

我想授予应用程序权限,以便使用HybridAuth(http://hybridauth.sourceforge.net/)和PHP将视频发布到我的YouTube频道。

  1. 第一个问题是可能吗?
    我已经可以验证并授予权限facebook,linkedin和twitter。我可以将状态发布到这些网络。尚未尝试连接到谷歌,但应该很容易添加,我假设我只需要谷歌身份验证才能访问Youtube?

  2. HybridAuth的哪个部分可用于上传视频?有没有可以用来学习的示例应用程序?有没有人这样做过?

2 个答案:

答案 0 :(得分:0)

不,你不能在Youtube上使用它,但是可以和Vimeo一起使用。

答案 1 :(得分:0)

您可以使用HybridAuth连接到Google API并在Google中注册您的应用程序/专业版(HybridAuth已启用与Google的连接,请参阅文档以供参考),当您向Google注册专业版时,您可以开始添加/启用通过浏览可用的API列表项来使用Google API。您将找到一个名为YouTube Data API v3的API,单击它并启用将状态更改为ON。

完成后,您使用Google注册的专业版即可启用YouTube API,您必须转到凭据才能生成密钥。

希望它有所帮助...

以下是您通过Google开始使用YouTube的有用链接:

来源:https://developers.google.com/youtube/registering_an_application

标题:通过Google注册您的应用程序

转到Google Developers Console。 选择一个项目。 在左侧边栏中,选择API& AUTH。在API列表中,确保YouTube Data API v3的状态为“开”。 在左侧的边栏中,选择凭据。 API支持两种类型的凭据。创建适合您项目的凭据:

OAuth 2.0: Your application must send an OAuth 2.0 token with any request that accesses private user data. Your application sends a client ID and, possibly, a client secret to obtain a token. You can generate OAuth 2.0 credentials for web applications, service accounts, or installed applications.
Learn more

API keys: A request that does not provide an OAuth 2.0 token must send an API key. The key identifies your project and provides API access, quota, and reports.

If the key type you need does not already exist, create an API key by selecting Create New Key and then selecting the appropriate key type. Then enter the additional data required for that key type.