我一直在試圖生成身份驗證令牌用於VIMEO通過Rails應用程序無法生成認證令牌的VIMEO(VIMEO集成到Rails應用程序)
response = RestClient.post "https://api.vimeo.com/oauth/authorize",
:response_type => "code",
:client_id => '2c8f2be58dcce1f61bc4f0a86dfb8d1bc214a7e0',
:redirect_uri => 'http://staging.tutorsweb.com',
:state => 'as684fad2asdflkjsadf4521s'
上面的代碼是如何我發送請求到Vimeo。
的反應是這樣的:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Authentication error on Vimeo</title>
<meta name="viewport" content="width=device-width,maximum-scale=1.0">
<meta name="robots" content="noindex,nofollow">
<link rel="stylesheet" href="https://f.vimeocdn.com/styles/css_opt/auth.min.css?508754847a">
<link rel="apple-touch-icon-precomposed" media="(resolution: 326dpi)" href="https://f.vimeocdn.com/images_v6/apple-touch-icon-114.png">
<link rel="apple-touch-icon-precomposed" media="(resolution: 163dpi)" href="https://f.vimeocdn.com/images_v6/apple-touch-icon-57.png">
<link rel="apple-touch-icon-precomposed" media="(resolution: 132dpi)" href="https://f.vimeocdn.com/images_v6/apple-touch-icon-72.png">
</head>
<body>
<div id="authorization">
<header class="page">
<div id="logo">
<a href="//vimeo.com" title="Go home">
<img class="svg" src="https://f.vimeocdn.com/logo.svg" alt="Go home" width="140" height="40">
</a>
</div>
</header>
<section class="content">
<div id="security" style="display:none">
<script>if(self==top){document.getElementById("security").style.display="block"}else{top.location=self.location}</script>
<h3 class="hot">Uh oh, something went wrong!</h3>
<p>An error has occurred. You won't be able to connect to Vimeo until it is fixed by the developer.</p>
<p>Hm. We're not sure what you're trying to do. Please contact the service you want to connect to Vimeo, and tell them,</p>
<p>"We were unable to provide your user an oauth2 authorization code because the redirect URI or client ID were missing."</p>
<p><a class="btn btn_gray" onclick="window.history.back();return false">Go back</a></p>
</div>
<noscript>
<h3 class="hot">JavaScript Required</h3>
<p>In order to protect your Vimeo account from unauthorized access, this page requires JavaScript.</p>
</noscript>
</section>
<footer>
You can change any application access preferences from your <a href="//vimeo.com/settings/extend">settings page</a>. </footer>
</div>
<script>var token=document.getElementById('token');if(token){document.cookie='xsrft=' + token.value}</script>
</body>
</html>
,我一直在關注https://github.com/matthooks/vimeo/tree/master我試圖matthooks還,但它並沒有爲我工作。
請指教我該怎麼做? 以及我如何通過示例爲我的rails應用程序生成vimeo的身份驗證令牌