Skip to content

Instantly share code, notes, and snippets.

@sanoyo
Last active January 9, 2018 13:06
Show Gist options
  • Save sanoyo/c49d36e82e57cb1e7a59595676787332 to your computer and use it in GitHub Desktop.
Save sanoyo/c49d36e82e57cb1e7a59595676787332 to your computer and use it in GitHub Desktop.
Youtube API 使い方 [2017/01/06]

Youtube API 使い方

主な流れ

  1. Google アカウント取得
  2. API Key 発行
  3. Youtube APIをactivateに変更
  4. Laravel composerインストール

少しつまずいた箇所

・動画の表示は、'player'という配列に入っている。

・Youtube::getVideoInfo('rie-hPVJ7Sw')で取得している、'rie-hPVJ7Sw'は、youtubeの動画リンクの最後尾の箇所を指している。

参考URL

公式ドキュメント https://github.com/alaouy/Youtube

日本語参考リンク http://www.d2c-smile.com/201611018039

Youtube API参考リンク https://developers.google.com/youtube/v3/getting-started?hl=ja

@sanoyo
Copy link
Author

sanoyo commented Jan 6, 2018

【現状問題点】
iframeの動画が表示されない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment