我用的是PyTumblr。我有消费者密钥和消费者机密,我试图请求访问令牌和令牌机密
在pytumblr github页面上,他们说:
Two easy ways to get your credentials to are:
- The built-in interactive_console.py tool (if you already have a consumer key & secret)
- The Tumblr API console at https://api.tumblr.com/console
很好,但是interactive_console.py
等待用户交互。基本上,它会将你发送到一个网页来自动调整你想要访问的Tumblr应用程序。在
如您所见: https://github.com/tumblr/pytumblr/blob/master/interactive_console.py
他们说:
# Redirect to authentication page
print '\nPlease go here and authorize:\n%s?oauth_token=%s' % (authorize_url, request_token['oauth_token'][0])
redirect_response = raw_input('Allow then paste the full redirect URL here:\n')
第二种方法是直接访问网站。在
我的问题是:有没有什么方法可以在不与网站交互的情况下获得令牌(只是通过编程)来自动调整它,然后再获取令牌?
谢谢你!在
不,Tumblr使用oauth,它需要创建每个会话的密钥来与服务交互。在
相关问题 更多 >
编程相关推荐