【问题标题】:How to get the youtube video timing from it's id in Laravel 5.1?如何从 Laravel 5.1 中的 id 获取 youtube 视频时间?
【发布时间】:2016-05-20 03:48:39
【问题描述】:

我需要在我的视图中显示 youtube 视频的时间。谁能帮我继续?提前致谢。

【问题讨论】:

    标签: php youtube-api laravel-5.1


    【解决方案1】:

    youtube 有很多 php 库。您可以使用其中之一,也可以使用 guzzle 直接调用 youtube api。使用库更容易。在这个library中尝试getVideoInfo方法

    直接 Youtube API

    GET https://www.googleapis.com/youtube/v3/videos?part=contentDetails&id={VideoId}&key={YOUR_API_KEY}

    Try Youtube API

    【讨论】:

      猜你喜欢
      • 2023-03-11
      • 2020-01-19
      • 1970-01-01
      • 2012-05-22
      • 2011-03-28
      • 2012-08-14
      • 2014-12-15
      • 2016-09-28
      相关资源
      最近更新 更多