我想创建一个manage.py命令,该命令从查询集中获取对象并将其发布到我的Twitter上.我打算使用here中描述的卷曲方法.
但Twitter已禁用基本身份验证.我不想安装类似Tweepy的过度库,让人们使用oAuth对我的网站进行身份验证,我只是想发推文.在一个帐户上.
最佳答案
来自twitter api页面:
原文链接:https://www.f2er.com/python/439118.htmlFor applications with single-user use cases,we now offer the ability to issue an access token for your own account (and your own applications). You can generate these keys from your application details pages. Find out more about using a single access token.
转到https://dev.twitter.com/apps拿到你的钥匙
从那里开始,python-twitter将很乐意为您解析这些密钥
api = twitter.Api(consumer_key='consumer_key',consumer_secret='consumer_secret',access_token_key='access_token',access_token_secret='access_token_secret')