File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
3- // Sample PHP code for user authorization
4-
53// Call set_include_path() as needed to point to your client library.
6- require_once 'Google/autoload.php ' ;
7- require_once 'Google/Client.php ' ;
8- require_once 'Google/Service/YouTube.php ' ;
4+ if (!file_exists ($ file = __DIR__ . '/vendor/autoload.php ' )) {
5+ throw new \Exception ('please run "composer require google/apiclient:~2.0" in " ' . __DIR__ .'" ' );
6+ }
7+ require_once __DIR__ . '/vendor/autoload.php ' ;
98session_start ();
109
1110/*
@@ -22,7 +21,7 @@ function getClient() {
2221 // Set to valid redirect URI for your project.
2322 $ client ->setRedirectUri ('http://localhost ' );
2423
25- $ client ->addScope (GOOGLE_SERVICE_YOUTUBE ::YOUTUBE_READONLY );
24+ $ client ->addScope (Google_Service_YouTube ::YOUTUBE_READONLY );
2625 $ client ->setAccessType ('offline ' );
2726
2827 // Load previously authorized credentials from a file.
You can’t perform that action at this time.
0 commit comments