我想将经过身份验证的 vimeo 用户的视频集成到我的 Web 应用程序中。我有这个代码https://gist.github.com/2944212
我打了授权电话,现在我得到了oauth_token, oauth_token_secret, oauth_verifier。我将所有这些内容添加到参数中并向以下 url 发出请求,但现在我收到此错误
>>> url = 'http://vimeo.com/oauth/access_token'
>>> req = oauth.Request(method='GET', url=url, parameters=params)
>>> req.sign_request(signature_method, consumer, token)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/oauth2/__init__.py", line 502, in sign_request
self['oauth_signature'] = signature_method.sign(self, consumer, token)
File "/usr/lib/python2.7/dist-packages/oauth2/__init__.py", line 838, in sign
key, raw = self.signing_base(request, consumer, token)
File "/usr/lib/python2.7/dist-packages/oauth2/__init__.py", line 832, in signing_base
key += escape(token.secret)
AttributeError: 'str' object has no attribute 'secret'
使用它如何获取access_token并使此方法起作用https://developer.vimeo.com/apis/advanced/methods/vimeo.videos.getUploaded
我是 oauth 的新手,我需要你的帮助。
谢谢!
更新
现在我解决了这个错误。我唯一需要的是获取访问令牌和脚本来请求此方法https://developer.vimeo.com/apis/advanced/methods/vimeo.videos.getUploaded