最近我在 Twitter 上做一个小项目,我想获取一些特定用户的推文。
所以我使用Streaming API
、pycurl
和python
。
API 引用说 follow
参数是:
A comma separated list of user IDs, indicating the users to return statuses for in the stream. See the follow parameter documentation for more information.
我尝试过这个
c.setopt(c.POSTFIELDS, 'follow=slaindev')
但返回的消息不是slaindev
发布的推文,而是一个错误
Parameter follow has unparseable items slaindev
那么我是否误解了用户ID的含义?我认为这是我们用来提及某人的一个(我的意思是我使用 @slaindev 来提及这个人)。
当我尝试跟踪参数时,它工作正常。
最佳答案
您对 user_id 的假设是不正确的。请参阅this , 例如。您正在谈论 screen_name。
关于python - Twitter Stream API,参数跟随有无法解析的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11921055/