【问题标题】:twitter4j location filter errortwitter4j 位置过滤器错误
【发布时间】:2016-06-28 05:29:33
【问题描述】:

我正在使用scalatwitter4j 来提取推文。我正在关注this 教程。我对示例中提到的位置做了完全相同的操作:

    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,仅在不接受搜索格式时才返回。 任何帮助都会非常有用。

【问题讨论】:

    标签: scala twitter twitter4j twitter-streaming-api


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-10-15
      • 2016-11-07
      • 2014-06-28
      • 1970-01-01
      • 2013-05-15
      • 1970-01-01
      • 2017-09-13
      • 1970-01-01
      相关资源
      最近更新 更多