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']);
それから私はビデオ親指のURLを取得しよう:
$vimeo_response = $lib->request('/videos/218234161/pictures', 'GET');
これはちょうどnull値を返します。
この時点でもう何を試していいのか分かりません。
の二つのパラメータ: https://developer.vimeo.com/apps
私はクライアントIDと秘密と一緒にトークンを持っていたら、これだったのコードです'accessToken'メソッドは定数ですか? –
私はそれが働いて、ありがとう! –