Git Product home page Git Product logo

twitter4s's Introduction

twitter4s

twitter4s Scala version support CircleCI codecov.io License Scala Steward badge Chat

An asynchronous non-blocking Scala Twitter Client, implemented using Akka-Http and json4s.

Prerequisites

  • JDK 8
  • Scala 2.12+
  • Go to https://developer.twitter.com/, login with your twitter account and register your application to get a consumer key and a consumer secret.
  • Once the app has been created, generate a access key and access secret with the desired permission level.

NOTE: v1.1 endpoints are unaccessible for new users. More information at https://twittercommunity.com/t/ushering-in-a-new-era-for-the-twitter-developer-platform-with-the-twitter-api-v2/162087

Rate Limits

Be aware that the Twitter REST Api has rate limits specific to each endpoint. For more information, please have a look at the Twitter developers website here.

For all the endpoints that are affected these limitations, information on the current rates together with the requested data is provided by the RatedData case class.

Setup

If you don't have it already, make sure you add the Maven Central as resolver in your SBT settings:

resolvers += Resolver.sonatypeRepo("releases")

Also, you need to include the library as your dependency:

libraryDependencies += "com.danielasfregola" %% "twitter4s" % "8.0"

Giter8

If you are starting from scratch, you can use twitter4s.g8 template to start your project. This template contains examples for both REST and Streaming client.

> sbt new DanielaSfregola/twitter4s.g8

Usage

Add your consumer and access token as either environment variables or as part of your configuration. Twitter4s will look for the following environment variables:

export TWITTER_CONSUMER_TOKEN_KEY='my-consumer-key'
export TWITTER_CONSUMER_TOKEN_SECRET='my-consumer-secret'
export TWITTER_ACCESS_TOKEN_KEY='my-access-key'
export TWITTER_ACCESS_TOKEN_SECRET='my-access-secret'

You can also add them to your configuration file, usually called application.conf:

twitter {
  consumer {
    key = "my-consumer-key"
    secret = "my-consumer-secret"
  }
  access {
    key = "my-access-key"
    secret = "my-access-secret"
  }
}

These configurations will be automatically loaded when creating a twitter client, so all you have to do is to initialize your clients as following:

import com.danielasfregola.twitter4s.TwitterRestClient
import com.danielasfregola.twitter4s.TwitterStreamingClient

val restClient = TwitterRestClient()
val streamingClient = TwitterStreamingClient()

Alternatively, you can also specify your tokens directly when creating the client:

import com.danielasfregola.twitter4s.TwitterRestClient
import com.danielasfregola.twitter4s.TwitterStreamingClient
import com.danielasfregola.twitter4s.entities.{AccessToken, ConsumerToken}

val consumerToken = ConsumerToken(key = "my-consumer-key", secret = "my-consumer-secret")
val accessToken = AccessToken(key = "my-access-key", secret = "my-access-secret")  

val restClient = TwitterRestClient(consumerToken, accessToken)
val streamingClient = TwitterStreamingClient(consumerToken, accessToken)

Once you have instantiated your client you are ready to use it! ๐Ÿ˜„

Twitter Streaming Client

TwitterStreamingClient is the client to support stream connections offered by the Twitter Streaming Api.

You can initialize the client as follows:

import com.danielasfregola.twitter4s.TwitterStreamingClient

val client = TwitterStreamingClient()

There are three types of streams, each with different streaming message types: Public Stream, User Stream, Site Stream.

Each stream requires a partial function that indicates how to process messages. If a message type is not specified, it is ignored. See the section of each stream for more information.

For example, you can create the following function to print the text of a tweet:

import com.danielasfregola.twitter4s.entities.Tweet
import com.danielasfregola.twitter4s.entities.streaming.StreamingMessage

def printTweetText: PartialFunction[StreamingMessage, Unit] = {
    case tweet: Tweet => println(tweet.text)
}

All you need to do is attach your processing function to the stream:

client.sampleStatuses(stall_warnings = true)(printTweetText)

...and you are done, happy days! ๐Ÿ‘ฏ

Have a look at TwitterProcessor for some predefined processing functions.

Close or Replace a Stream

Each stream function returns a Future[TwitterStream]. TwitterStream represents the stream received by Twitter and it can be used to close or replace the current stream.

For example, consider the following snippet:

  // TERRIBLE CODE! NEVER BLOCK! Code for demo purposes only!
  def simulateNextActionAfterMillis(millis: Long): Future[Unit] = Future{ Thread.sleep(millis); println() }

  for {
    streamA <- client.sampleStatuses(languages = Seq(Language.English)){ case t: Tweet => print("o")}
    _ <- simulateNextActionAfterMillis(10000)
    streamB <- streamA.sampleStatuses(languages = Seq(Language.Spanish)){ case t: Tweet => print("+")}
    _ <- simulateNextActionAfterMillis(10000)
  } yield streamB.close()

The above code can output something similar to the following:

oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
+++++++++++++++

In this example, we can see that there are more English tweets than Spanish tweets.

Public Stream

Have a look at the complete scaladoc for the Public Stream Client.

Available streams

  • filterStatusesFilter
  • sampleStatusesSample
  • firehoseStatuses

CommonStreamingMessage types:

User Stream

Have a look at the complete scaladoc for the User Stream Client.

Available streams

  • userEvents

UserStreamingMessage types:

Site Stream

Have a look at the complete scaladoc for the Site Stream Client.

Available streams

  • siteEvents

SiteStreamingMessage types:

Documentation

The complete scaladoc with all the available streams for the TwitterStreamingClient can be found here.

Twitter REST Client

TwitterRestClient is the client for the REST endpoints offered by the Twitter REST Api.

Once you have configured your consumer and access token, you can initialize an instance of TwitterRestClient as follows:

import com.danielasfregola.twitter4s.TwitterRestClient

val client = TwitterRestClient()

For example, you can get the home timeline of the authenticated user:

client.homeTimeline()

or you can get the timeline of a specific user:

client.userTimelineForUser("DanielaSfregola")

You can also update your tweet status:

client.tweet(status = "Test")

Asynchronous upload of images or short videos is also supported:

for {
  upload <- client.uploadMediaFromPath("/path/to/file.png")
  tweet <- client.tweet(status = "Test with media", media_ids = Seq(upload.media_id))
} yield tweet

Documentation

The complete scaladoc with all the available functionalities for the TwitterRestClient can be found here.

TwitterRestClient is composed by several traits. A list of the supported resources is following:

Proxy Support

If needed, you can redefine the domain used for each of the twitter api by overriding the following settings in your configuration file:

twitter {

  rest {
    api = "https://api.twitter.com"
    media = "https://upload.twitter.com"
  }

  streaming {
    public = "https://stream.twitter.com"
    user = "https://userstream.twitter.com"
    site = "https://sitestream.twitter.com"
  }
}

Logging

Twitter4s uses scala-logging and can be used in your twitter4s application.

In your application you will need a logging backend (logback, logstash). logback-classic is easy to use and will suit most needs. You can find a sample configuration in twitter4s-demo and in the Giter8 template twitter4s.g8

Examples

Have a look at the repository twitter4s-demo for more examples on how to use twitter4s.

Snapshot Versions

To use a snapshot version of this library, make sure you have the resolver for maven central (snapshot repositories) in your SBT settings:

resolvers += Resolver.sonatypeRepo("snapshots")

Then, add the library as your dependency:

libraryDependencies += "com.danielasfregola" %% "twitter4s" % "8.1-SNAPSHOT"

Coming up Features

  • OAuth1 support
  • Advanced query support
  • Support for dump to file
  • ...

How to Contribute

Contributions and feature requests are always welcome!

  • Fork the repo and checkout the code
  • Make sure to run sbt with jdk8+
  • Run the tests with sbt test
  • ...you can now do your magic and submit a PR when you are ready! ๐Ÿ‘ฏ

twitter4s's People

Contributors

abalonperin avatar allantl avatar broilogabriel avatar carolinadominguez avatar catalin-ursachi avatar danielasfregola avatar elfolink avatar gaarv avatar guangyusong avatar guizmaii avatar jesusmtnez avatar julien-pons avatar lapmid avatar lionetxue avatar lmyslinski avatar memoizr avatar mergify[bot] avatar mitgard avatar nguyenvietyen avatar npeters avatar ocete avatar oschrenk avatar rtyley avatar scala-steward avatar smrnv avatar thiago-preira avatar valydia avatar vooolll avatar zyuiop avatar zzvara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitter4s's Issues

Image Resolution

We know that you can change the image resolution of a user image profile (see #64 ).
Can we do it for other media as well? If so, it would be cool to support it.

StreamingMessages and Streams

Not all the streaming messages are available for all the streaming types.
For example, events are only on UserStream.
This should be clear in both the type and the documentation.

Response parser error `No usable value for created_at`

Hi
When i run tests i got error messages similar to that in demo issue

DanielaSfregola/twitter4s-demo#1

When i go deeper i saw that have same problem even for such simple code

val formater = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZZ yyyy")
val date = formater.parse("Mon Dec 08 20:00:20 +0000 2014")
Exception in thread "main" java.text.ParseException: Unparseable date: "Mon Dec 08 20:00:20 +0000 2014"
    at java.text.DateFormat.parse(DateFormat.java:366)

But that works fine

val formater = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZZ yyyy", Locale.US)
val date = formater.parse("Mon Dec 08 20:00:20 +0000 2014")

Im from Poland so when default Locale are used they are set as PL

I thing problem is here

override def dateFormatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZZ yyyy")

here are used default Locale ( for me Locale.PL )

TEMPORARY (and only temporary) solution is set proper Locale

Locale.setDefault(Locale.US)

Filter by language

In partilar when streaming it would be cool to filter by language -- something like twitter4j does (language parameter en?) in the streaming client

Streaming API - statuses

We should make sure that all the parameters of the statuses streams are supported and that the methods defined are consistent with what we have done so far -- for example use a list for a list, not an option.

Doc fix

Fix scaladoc description of TwitterSearchClient.searchTweet

Write Simple Processors to support the most common dbs

A Processor is a partial function that process data from a stream and does something with it -- see documentation for more information.

Wouldn't be great having a set of predefined processors that save tweets from a stream for the most common used db? That would translate in implementing a function PartialFunction[Tweet, Unit] where the side effect is saving in a db -- probably with bulk update support?

NOTE: Not super simple but definitively fun and useful!

Proxy support

We should allow to override the domain of the URI, so that people can use the library behind a proxy

Add extended_entities to Tweeet

tweet_mode=extended gives more media (extra jpg, gifs and video)
Most of the media coming from entended_entites.
search rest API should be fixed accordingly.

"extended_entities": { "media": [ { "id": 824577120492015600, "id_str": "824577120492015616", "indices": [ 63, 86 ], "media_url": "http://pbs.twimg.com/media/C3F8hbTXUAAym4i.jpg", "media_url_https": "https://pbs.twimg.com/media/C3F8hbTXUAAym4i.jpg", "url": "https://t.co/GzxWYyPuMy", "display_url": "pic.twitter.com/GzxWYyPuMy", "expanded_url": "https://twitter.com/yeniakit/status/824577122358427648/photo/1", "type": "photo", "sizes": { "large": { "w": 625, "h": 313, "resize": "fit" }, "small": { "w": 625, "h": 313, "resize": "fit" }, "medium": { "w": 625, "h": 313, "resize": "fit" }, "thumb": { "w": 150, "h": 150, "resize": "crop" } } } ] },

Dump to file Processor

It would be cool to have a predefined processor to dump everything or just a specific message to a file

Remove `get` from methods calls

There are a lot of methods called getProfileSettings, getUrl, getStatusesFilter (this last one is terrible!).

As discussed during the ScalaXHack, this makes sense in java, but not in scala where we could have a much more natural method calls without the get: profileSettings, url, filterStatuses....

We should change all the methods to have the new style. Because this is a major change, we will have to:

  • deprecate the old style methods to give time to people to migrate
  • do a major release.

Add more apply functions

Following HackTheTower in Jan 2017, add more apply functions to give more options when creating the clients.

Replace a stream

One a stream has been started with certain parameters, it would be cool to have the opportunity to replace it with another with different parameters.

Stream - 403 Forbidden

At present, if the stream gets rejected because of permission issues -- like 403 Forbidden -- we simply explode all over the place.

We should fail more gracefully -- and check the behaviour for the REST clients as well!

User Image Resolution

We discovered that by changing _bigger, _small, _normal to the url, you can change the resolution of an image.

It would be cool to support it

Migration to Akka-Http

We currently using Spray -- that is no longer supported by the Akka team.
We should migrate to Akka-Http.

Update readme for REST + Streaming Client APIs

Following #11, the TwitterClient is now initialised slightly different.

  1. update the readme with new initialisation
  2. update blog article with new initialisation
  3. mention env variables automatic detection in readme

Stream can not be received in a few minutes

When the stream stops, no error is displayed.
How can I improve the fault tolerance of my application?

example codes

// main.scala
import com.danielasfregola.twitter4s.entities.enums.Language
import com.danielasfregola.twitter4s.{TwitterStreamingClient}
import com.danielasfregola.twitter4s.entities.{Tweet}
object main {
  def main(args: Array[String]): Unit = {
    val streamingClient = TwitterStreamingClient()
    streamingClient.sampleStatuses(Seq(Language.Japanese)) {
      case tweet: Tweet => println(tweet.text)
      case other => println(other)
    }

    println("Pooling...")
    if (io.StdIn.readLine != null) {
      println("Shutdown")
      streamingClient.system.terminate()
    }
  }
}
// build.sbt

scalaVersion := "2.11.8"

resolvers += Resolver.sonatypeRepo("releases")

libraryDependencies ++= {
  val akkaVersion = "2.4.16"
  Seq(
    "com.typesafe.akka" %% "akka-actor" % akkaVersion,
    "com.danielasfregola" %% "twitter4s" % "4.0"
  )
}

fork in run := true
connectInput in run := true

ActorSystem shutdown

As suggested at the HackTheTower in Jan 2017, we should have a function to terminate the actor system associated to the client.

Improve coverage of `StreamingMessageSerializers`

Commenting out lines from this file does not break any tests, when it probably should. Example:

  object StreamingMessageSerializer extends CustomSerializer[StreamingMessage](implicit format =>
    ({
      case json => findOrExplode(json)(streamingMessageStream(json))
    }, {
      case tweet: Tweet => Extraction.decompose(tweet)
//      case disconnectMsg: DisconnectMessage => Extraction.decompose(disconnectMsg)
//      case limitNotice: LimitNotice => Extraction.decompose(limitNotice)
//      case locationDeletionNotice: LocationDeletionNotice => Extraction.decompose(locationDeletionNotice)
//      case statusDeletionNotice: StatusDeletionNotice => Extraction.decompose(statusDeletionNotice)
//      case statusWithheldNotice: StatusWithheldNotice => Extraction.decompose(statusWithheldNotice)
//      case userWithheldNotice: UserWithheldNotice => Extraction.decompose(userWithheldNotice)
//      case warningMessage: WarningMessage => Extraction.decompose(warningMessage)
//      case directMessage: DirectMessage => Extraction.decompose(directMessage)
//      case twitterListEvent: TwitterListEvent => Extraction.decompose(twitterListEvent)
//      case tweetEvent: TweetEvent => Extraction.decompose(tweetEvent)
//      case simpleEvent: SimpleEvent => Extraction.decompose(simpleEvent)
//      case controlMessage: ControlMessage => Extraction.decompose(controlMessage)
//      case userEnvelopTweet: UserEnvelopTweet => Extraction.decompose(userEnvelopTweet)
//      case userEnvelopDirectMessage: UserEnvelopDirectMessage => Extraction.decompose(userEnvelopDirectMessage)
//      case userEnvelopTwitterListEvent: UserEnvelopTwitterListEvent => Extraction.decompose(userEnvelopTwitterListEvent)
//      case userEnvelopTweetEvent: UserEnvelopTweetEvent => Extraction.decompose(userEnvelopTweetEvent)
//      case userEnvelopSimpleEvent: UserEnvelopSimpleEvent => Extraction.decompose(userEnvelopSimpleEvent)
//      case userEnvelopWarningMessage: UserEnvelopWarningMessage => Extraction.decompose(userEnvelopWarningMessage)
//      case userEnvelopTweetStringified: UserEnvelopTweetStringified => Extraction.decompose(userEnvelopTweetStringified)
//      case userEnvelopDirectMessageStringified: UserEnvelopDirectMessageStringified => Extraction.decompose(userEnvelopDirectMessageStringified)
//      case userEnvelopTwitterListEventStringified: UserEnvelopTwitterListEventStringified => Extraction.decompose(userEnvelopTwitterListEventStringified)
//      case userEnvelopTweetEventStringified: UserEnvelopTweetEventStringified => Extraction.decompose(userEnvelopTweetEventStringified)
//      case userEnvelopSimpleEventStringified: UserEnvelopSimpleEventStringified => Extraction.decompose(userEnvelopSimpleEventStringified)
//      case userEnvelopWarningMessageStringified: UserEnvelopWarningMessageStringified => Extraction.decompose(userEnvelopWarningMessageStringified)
//      case userEnvelopFriendsLists: UserEnvelopFriendsLists => Extraction.decompose(userEnvelopFriendsLists)
//      case userEnvelopFriendsListsStringified: UserEnvelopFriendsListsStringified => Extraction.decompose(userEnvelopFriendsListsStringified)
//      case friendsLists: FriendsLists => Extraction.decompose(friendsLists)
//      case friendsListsStringified: FriendsListsStringified => Extraction.decompose(friendsListsStringified)
    }))

and

  private def siteStreamingMessageStream(json: JValue)(implicit formats: Formats): Stream[() => Option[SiteStreamingMessage]] =
    Stream(
      () => Extraction.extractOpt[ControlMessage](json)
//      () => Extraction.extractOpt[UserEnvelopTweet](json),
//      () => Extraction.extractOpt[UserEnvelopDirectMessage](json),
//      () => Extraction.extractOpt[UserEnvelopTwitterListEvent](json),
//      () => Extraction.extractOpt[UserEnvelopTweetEvent](json),
//      () => Extraction.extractOpt[UserEnvelopSimpleEvent](json),
//      () => Extraction.extractOpt[UserEnvelopWarningMessage](json),
//      () => Extraction.extractOpt[UserEnvelopTweetStringified](json),
//      () => Extraction.extractOpt[UserEnvelopDirectMessageStringified](json),
//      () => Extraction.extractOpt[UserEnvelopTwitterListEventStringified](json),
//      () => Extraction.extractOpt[UserEnvelopTweetEventStringified](json),
//      () => Extraction.extractOpt[UserEnvelopSimpleEventStringified](json),
//      () => Extraction.extractOpt[UserEnvelopWarningMessageStringified](json)
    )

README Streaming messages

Now that we have refactored the streaming messages, it would cool to have in the readme a clear list of all the possible message types for each stream type

is it possible to deal with RateLimit in some way?

is it possible to deal with RateLimit in some way?

[INFO] [01/02/2017 20:18:37.005] [twitter4s-rest-akka.actor.default-dispatcher-2] [ActorSystem(twitter4s-rest)] GET https://api.twitter.com/1.1/search/tweets.json?count=100&include_entities=true&lang=es&q=android&result_type=recent (429 Too Many Requests) | 1082ms
com.danielasfregola.twitter4s.exceptions.TwitterException: [429 Too Many Requests] Rate limit exceeded (88)
at com.danielasfregola.twitter4s.http.clients.Client$$anonfun$unmarshalResponse$1.apply(Client.scala:53)
at com.danielasfregola.twitter4s.http.clients.Client$$anonfun$unmarshalResponse$1.apply(Client.scala:46)
at scala.util.Success$$anonfun$map$1.apply(Try.scala:237)
at scala.util.Try$.apply(Try.scala:192)
at scala.util.Success.map(Try.scala:237)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

`PipelineException: No usable value for search_metadata` on empty search result

When I perform a search and there is no results I get the error :

[PipelineException: No usable value for search_metadata
No usable value for next_results
Did not find value which can be converted into java.lang.String]

My Play action :

def test() = Action.async { implicit req =>
  new TwitterClient().searchTweet(
    query = "qsfomq",
    count = 10,
    include_entities = true,
    result_type = ResultType.Recent).map { res =>
    Ok("ok")
  }
}

And the full stacktrace :

play.api.Application$$anon$1: Execution exception[[PipelineException: No usable value for search_metadata
No usable value for next_results
Did not find value which can be converted into java.lang.String]]
    at play.api.Application$class.handleError(Application.scala:296) ~[play_2.11-2.3.10.jar:2.3.10]
    at play.api.DefaultApplication.handleError(Application.scala:402) [play_2.11-2.3.10.jar:2.3.10]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$14$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:205) [play_2.11-2.3.10.jar:2.3.10]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$14$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:202) [play_2.11-2.3.10.jar:2.3.10]
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36) [scala-library-2.11.7.jar:na]
Caused by: spray.httpx.PipelineException: No usable value for search_metadata
No usable value for next_results
Did not find value which can be converted into java.lang.String
    at spray.httpx.ResponseTransformation$$anonfun$unmarshal$1.apply(ResponseTransformation.scala:36) ~[spray-httpx_2.11-1.3.3.jar:na]
    at spray.httpx.ResponseTransformation$$anonfun$unmarshal$1.apply(ResponseTransformation.scala:31) ~[spray-httpx_2.11-1.3.3.jar:na]
    at spray.httpx.TransformerPipelineSupport$WithTransformation.$tilde$greater(TransformerPipelineSupport.scala:33) ~[spray-httpx_2.11-1.3.3.jar:na]
    at com.danielasfregola.twitter4s.http.clients.OAuthClient$$anonfun$unmarshalResponse$1.apply(OAuthClient.scala:34) ~[twitter4s_2.11-0.2.jar:0.2]
    at com.danielasfregola.twitter4s.http.clients.OAuthClient$$anonfun$unmarshalResponse$1.apply(OAuthClient.scala:32) ~[twitter4s_2.11-0.2.jar:0.2]
Caused by: org.json4s.package$MappingException: No usable value for search_metadata
No usable value for next_results
Did not find value which can be converted into java.lang.String
    at org.json4s.reflect.package$.fail(package.scala:96) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder.org$json4s$Extraction$ClassInstanceBuilder$$buildCtorArg(Extraction.scala:462) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:482) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:482) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245) ~[scala-library-2.11.7.jar:na]
Caused by: org.json4s.package$MappingException: No usable value for next_results
Did not find value which can be converted into java.lang.String
    at org.json4s.reflect.package$.fail(package.scala:96) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder.org$json4s$Extraction$ClassInstanceBuilder$$buildCtorArg(Extraction.scala:462) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:482) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:482) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245) ~[scala-library-2.11.7.jar:na]
Caused by: org.json4s.package$MappingException: Did not find value which can be converted into java.lang.String
    at org.json4s.Extraction$.convert(Extraction.scala:603) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$.extract(Extraction.scala:350) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder.org$json4s$Extraction$ClassInstanceBuilder$$buildCtorArg(Extraction.scala:450) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:482) ~[json4s-core_2.11-3.2.11.jar:3.2.11]
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:482) ~[json4s-core_2.11-3.2.11.jar:3.2.11]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.