就“TweetStream”方法而言,我目前可以很好地访问Ruby;然而,每当我试图将任何流内容限制在一个边界框(我知道这是有效的)时,它就会忽略代码或根本不运行。
下面是我的一些代码:
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我也尝试过"locations“方法:
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')。
有人有什么想法吗?
发布于 2012-01-18 12:33:40
TweetStream::Client.new.locations(-80.29,32.57,-79.56,33.09) do |tweet|
p tweet.inspect
end或者是它的一些变体。
https://stackoverflow.com/questions/8905110
复制相似问题