2015年5月14日星期四

SitePoint PHP Blog: Displaying Youtube Videos in PHP


The SitePoint PHP blog has a new post today showing you how to display YouTube videos inside your application as a part of this series. The series is using Laravel as a framework to create the application.



In this two-part article, we're going to learn how to work with version 3 of the Youtube API and we'll build a demo along the way. [...] We're going to build a demo that lets the user browse popular videos on Youtube, search for a video, browse videos by categories, and select a video to watch. I will be using Laravel 5 as my framework of choice, and Vagrant for my development environment.


The end result will show a set of video thumbnails related to the selected category. He walks you through the steps to get the application set up and running including the configuration of your Google API connection. He creates a login controller to allow users to log in with their Google credentials and the callback to handle the API response. From there he makes the YouTube service provider, the "video list" endpoint (and view) and a single video page with an embedded player.


Link: http://www.sitepoint.com/displaying-youtube-videos-php/

没有评论:

发表评论