开发者

How to OAuth Twitter with httplib2 and Python 3.x?

开发者 https://www.devze.com 2023-03-16 19:26 出处:网络
I know there are a lot of Python Twitter API and OAuth wrappers out there, but I don\'t want to use them. I want to use nothing more than httplib2 and Python 3.x standard library. Could you please dem

I know there are a lot of Python Twitter API and OAuth wrappers out there, but I don't want to use them. I want to use nothing more than httplib2 and Python 3.x standard library. Could you please demonstrate simpl开发者_高级运维e code examples on how to achieve that? Thanks in advance.


You can look at python-oauth2. The main implementation code is very readable. Since there are a lot of thorny issues here like precisely how you encode your forms it is tricky to get right. I would recommend just using the oauth2 library, that is what I've done to integrate with Twitter (httplib2 + oauth2 + Twitter's REST/streaming APIs).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号