2016-03-13 36 views
1

我使用scalatwitter4j来提取推文。我正在关注this教程。我确实做到了该位置的相同的例子中提到:twitter4j位置过滤器错误

val austinBox = Array(Array(-97.8,30.25),Array(-97.65,30.35)) 
    twitterStream.filter(new FilterQuery().locations(austinBox)) 

我得到这个错误为:

Error:(64, 54) type mismatch; 
    found : Array[Array[Double]] 
    required: Array[Double] 

我改变了价值Array[Double]为:

val austinBox = Array(-97.8,30.25) 
    twitterStream.filter(new FilterQuery().locations(austinBox)) 

现在我得到406 error code这是仅当搜索格式不被接受时才返回。 任何帮助将非常有用。

回答

1

请检查您的twitter4j版本。它看起来像当前版本(> + = 4.0.X)仍在开发中。所以使用3.0.5将使代码工作。