0
我使用Vimeo的API在這裏: https://github.com/vimeo/vimeo.phpVimeo的PHP API - 使身份驗證的請求
我已經包括像這樣:
// include the autoload file from the vimeo php library that was downloaded
include __DIR__ . '/vimeo/autoload.php';
// The client id and client secret needed to use the vimeo API
$clientId = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$clientSecret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
// when getting an auth token we need to provide the scope
// all possible scopes can be found here https://developer.vimeo.com/api/authentication#supported-scopes
$scope = array('public', 'private');
// initialize the vimeo library
$lib = new \Vimeo\Vimeo($clientId, $clientSecret);
// request an auth token (needed for all requests to the Vimeo API)
$token = $lib->clientCredentials($scope);
// redirect_uri must be provided, and must match your configured uri
$token = $lib->accessToken(code, redirect_uri);
// use the token
$lib->setToken($token['body']['access_token']);
然後我試圖讓視頻拇指網址:
$vimeo_response = $lib->request('/videos/218234161/pictures', 'GET');
這只是返回一個空值。
我不知道還有什麼要嘗試在這一點上。
的兩個參數'accessToken'方法是常量? –
我懂了,謝謝! –