cakephp中的Vimeo高级API授权错误
我正在为我的项目使用cakephp,我想使用高级API在vimeo中包括我的一个频道中列出的视频。为此,我从以下链接使用OAuth库 这是我的索引和回调函数代码cakephp中的Vimeo高级API授权错误,php,cakephp,oauth,vimeo,cakephp-2.3,Php,Cakephp,Oauth,Vimeo,Cakephp 2.3,我正在为我的项目使用cakephp,我想使用高级API在vimeo中包括我的一个频道中列出的视频。为此,我从以下链接使用OAuth库 这是我的索引和回调函数代码 public function index(){ $this->set('title_for_layout', 'Administrator | Videos'); $client = $this->createClient(); $reques
public function index(){
$this->set('title_for_layout', 'Administrator | Videos');
$client = $this->createClient();
$requestToken = $client->getRequestToken('https://vimeo.com/oauth/request_token', 'http://' . $_SERVER['HTTP_HOST'] . '/example/callback');
if ($requestToken) {
$this->Session->write('vimeo_request_token', $requestToken);
$this->redirect('https://vimeo.com/oauth/authorize?oauth_token=' . $requestToken->key);
} else {
echo "An error has occured";
}
}
public function callback() {
$requestToken = $this->Session->read('vimeo_request_token');
$client = $this->createClient();
$accessToken = $client->getAccessToken('https://vimeo.com/oauth/access_token', $requestToken);
}
但当索引页面加载后,它会将我重定向到以下链接
但它应该重定向、授权并返回到我当前的应用程序页面。有人知道怎么修吗?我现在试着做几个小时
谢谢各位,我在这里找到了更好的解决方案
http://stackoverflow.com/questions/17106097/how-to-use-vimeo-advanced-api-to-display-videos?answertab=oldest#tab-顶部