0

I am using Twitter4j for fetching trends from Twitter using the following code:

    val twitter = new TwitterFactory().getInstance
    val twitterStream = new TwitterStreamFactory().getInstance
    twitterStream.addListener(simpleStatusListener) 
    val trends = twitter.getTrends
    println(trends.getName)

I tried different methods for getting trends but I keep getting the following error:

value getTrends is not a member of twitter4j.Twitter

Can someone point out what is wrong?

om-nom-nom
  • 62,329
  • 13
  • 183
  • 228
princess of persia
  • 2,222
  • 4
  • 26
  • 43

1 Answers1

1

That method was removed from twitter4j and subsequently from the examples. Take a look at other trends-related methods that are currently supported.

The author has many other, up-to-date, examples here.

Alex Yarmula
  • 10,477
  • 5
  • 33
  • 32