PHP code example of arm092 / youtuber-for-laravel
1. Go to this page and download the library: Download arm092/youtuber-for-laravel library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once ('vendor/autoload.php' );
arm092 / youtuber-for-laravel example snippets
public function another_callback (Request $request) {
$redirect_url ='http://localhost/youtube-uploader/public/youtube/callback/another_callback' ;
$video_id = 'YOUR_VIDEO_ID' ;
$youtube = Youtube::setRedirectUrl($redirect_url)->updateTags($video_id, ['tag 1' , 'tag2' , 'Tag3' , 'Tag 4' ]);
}
public function another_callback (Request $request) {
$redirect_url ='http://localhost/youtube-uploader/public/youtube/callback/another_callback' ;
$youtube = Youtube::setRedirectUrl($redirect_url)
->createPlaylist('TITLE' , 'DESCRIPTION' );
$playlist_id = $youtube->createdPlaylistId();
}
public function another_callback (Request $request) {
$redirect_url ='http://localhost/youtube-uploader/public/youtube/callback/another_callback' ;
$youtube = Youtube::setRedirectUrl($redirect_url)
->VideoToPlaylist('VIDEO_ID' , 'PLAYLIST_ID' );
}
public function another_callback (Request $request) {
$redirect_url ='http://localhost/youtube-uploader/public/youtube/callback/another_callback' ;
$video_id = 'VIDEO_ID' ;
$youtube = Youtube::setRedirectUrl($redirect_url)->deleteVideo($video_id);
}