0

根据此 Ars Technica 教程,“流式 API 可以轻松检测用户何时获得新关注者。要检测关注事件对象,请查找“事件”键并检查它是否具有字符串“关注”作为值。”

http://arstechnica.com/information-technology/2010/04/tutorial-use-twitters-new-real-time-stream-api-in-python/2/

推文流 gem 应该公开 API 中的所有方法。但是我不知道如何获得那些关注请求!

有任何想法吗?

4

1 回答 1

0

tweetstream gem 相当完整,但有时您需要深入研究源代码才能找到东西:

client.on_event(:follow) do |event|
  p event[:source][:screen_name]
end

https://github.com/intridea/tweetstream/blob/master/lib/tweetstream/client.rb#L375 :)

于 2013-05-19T08:37:43.447 回答