私は開発中のWordPressウェブサイトでvimeo.phpを使用しようとしています。私は図書館をダウンロードしてテーマのフォルダに入れました。私はVimeo APIのウェブサイトにもアプリケーションを作成しました。Vimeo.php:単純なリクエストが動作しない
// Include Vimeo's php library
require_once("/assets/php/vimeo.php-1.3.0/autoload.php");
$client_id = 'xxxx'; //'Client identifier' in my app
$client_secret = 'xxxx'; // 'Client secrets' in my app
$lib = new \Vimeo\Vimeo($client_id, $client_secret);
function get_Vimeo(){
$response = $lib->request('https://vimeo.com/6327777', array(), 'GET');
return $response;
}
私はget_Vimeo()関数を呼び出すと、私はFatal error: Call to a member function request() on null
を得る:そして、私は以下のコードを使用します。
VimeoのAPIは私には分かりませんが、私が間違っていたことは何ですか?
私の答えをチェックしてください。トリックをする必要があります。何かが明確でない場合は更新してください。 –