【问题标题】:Ruby TweetStream Locations Feature not workingRuby TweetStream 位置功能不起作用
【发布时间】:2012-01-18 12:33:39
【问题描述】:

关于“过滤器”方法,我目前正在访问 Ruby TweetStream;但是,每当我尝试将任何流媒体内容限制在边界框内(我知道这可行)时,它都会忽略代码或根本不运行。

这是我的一些代码:

TweetStream.configure do |config|
  config.username    = 'USERNAME'
  config.password    = 'PASSWORD'
  config.auth_method = :basic
end

TweetStream::Client.new.filter({:locations => '-80.29,32.57,-79.56,33.09', :track => ["Bob Loblaw"]}) do |tweet|
  p tweet.inspect
end

我也尝试过“位置”方法:

TweetStream::Client.new.filter({:track => ["Bob Loblaw"]}).locations('-80.29,32.57,-79.56,33.09') do |tweet|
  p tweet.inspect
end

我也试过位置(['-80.29,32.57,-79.56,33.09'])和位置(['-80.29,32.57','-79.56,33.09'])。

有人有什么想法吗?

【问题讨论】:

    标签: ruby streaming twitter


    【解决方案1】:
    TweetStream::Client.new.locations(-80.29,32.57,-79.56,33.09) do |tweet|
      p tweet.inspect
    end
    

    或者它的一些变体。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-28
      • 2016-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多