Answer the question
In order to leave comments, you need to log in
Access token vimeo and how to get exactly my feeds?
For information, I create a link that the user clicks on to get a token
require("classes/vimeo/autoload.php");
$client_id = '';
$client_secret = '';
echo "This is an unauthenticated request to /users/dashron<br />";
$lib = new \Vimeo\Vimeo($client_id, $client_secret);
$_SESSION['state'] = base64_encode(openssl_random_pseudo_bytes(30));
echo 'To authenticate you should click <a href="'
. $lib->buildAuthorizationEndpoint('url', 'public', $_SESSION['state'])
. '">here</a><br />';
require("classes/vimeo/autoload.php");
$client_id = '';
$client_secret = '';
$token = '';
$lib = new \Vimeo\Vimeo($client_id, $client_secret);
$tokens = $lib->accessToken($_GET['code'], 'url');
if ($tokens['status'] == 200) {
echo $_SESSION['access_token'] = $tokens['body']['access_token'];
}
$lib->setToken($_SESSION['access_token']);
$response = $lib->request('/me/feed', array('per_page' => 20,'page'=>1), 'GET');
var_dump($response['body']);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question