forked from vimeo/vimeo-php-lib
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e66fd9
commit 67f1410
Showing
3 changed files
with
82 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
<? | ||
<?php | ||
include 'vimeo.php'; | ||
|
||
$vimeo = new phpVimeo('CONSUMER_KEY', 'CONSUMER_SECRET', 'ACCESS_TOKEN', 'ACCESS_TOKEN_SECRET'); | ||
|
||
try { | ||
$video_id = $vimeo->upload('PATH_TO_VIDEO_FILE'); | ||
if ($video_id) { | ||
echo '<a href="http://vimeo.com/' . $video_id . '">Upload successful!</a>'; | ||
//$vimeo->call('vimeo.videos.setPrivacy', array('privacy' => 'nobody', 'video_id' => $video_id)); | ||
$vimeo->call('vimeo.videos.setTitle', array('title' => 'YOUR TITLE', 'video_id' => $video_id)); | ||
$vimeo->call('vimeo.videos.setDescription', array('description' => 'YOUR_DESCRIPTION', 'video_id' => $video_id)); | ||
} | ||
else { | ||
echo "Video file did not exist!"; | ||
} | ||
$video_id = $vimeo->upload('PATH_TO_VIDEO_FILE'); | ||
|
||
if ($video_id) { | ||
echo '<a href="http://vimeo.com/' . $video_id . '">Upload successful!</a>'; | ||
|
||
//$vimeo->call('vimeo.videos.setPrivacy', array('privacy' => 'nobody', 'video_id' => $video_id)); | ||
$vimeo->call('vimeo.videos.setTitle', array('title' => 'YOUR TITLE', 'video_id' => $video_id)); | ||
$vimeo->call('vimeo.videos.setDescription', array('description' => 'YOUR_DESCRIPTION', 'video_id' => $video_id)); | ||
} | ||
else { | ||
echo "Video file did not exist!"; | ||
} | ||
} | ||
catch (VimeoAPIException $e) { | ||
echo "Encountered an API error -- code {$e->getCode()} - {$e->getMessage()}"; | ||
} | ||
|
||
?> | ||
echo "Encountered an API error -- code {$e->getCode()} - {$e->getMessage()}"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters