【发布时间】:2023-04-02 00:39:01
【问题描述】:
import twitter
client = twitter.Api()
client = twitter.Api(username='uname', password='password')
update = client.PostUpdate('Tweetin from python!')
这是我的代码。 当我执行这个程序时,我得到了这个错误
TypeError: __init__() got an unexpected keyword argument 'username'
有人可以帮我吗?
【问题讨论】:
-
您使用的 twitter 模块没有 API 构造函数的
username和password参数。你读过文档吗?