Twitte DM API Error

twitter4j

#1

We are using twitter4j library for twitter data which is throwing JSON parse error as Twitter is not sending “url” field in the response. Can you please let us know what need to be done here?

==
ERROR 2016-09-13 06:40:08,450 T_tdm-consumer-system-akka.actor.default-dispatcher-7 tdm.IRTdmAkkaConsumer: While processing twitterId: 61180382 row id: 34 :: JSONObject[“url”] not found.
Relevant discussions can be found on the Internet at:
http://www.google.co.jp/search?q=a315b5a9 or
http://www.google.co.jp/search?q=3a29705e
TwitterException{exceptionCode=[a315b5a9-3a29705e d18b7a18-558ecfbb], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=4.0.5-SNAPSHOT(build: 9b7efa6faa540a9defb3e6ba9122a356155986b1)}
at twitter4j.URLEntityJSONImpl.init(URLEntityJSONImpl.java:74)
at twitter4j.URLEntityJSONImpl.(URLEntityJSONImpl.java:34)
at twitter4j.UserJSONImpl.getURLEntitiesFromJSON(UserJSONImpl.java:188)
at twitter4j.UserJSONImpl.init(UserJSONImpl.java:105)
at twitter4j.UserJSONImpl.(UserJSONImpl.java:89)
at twitter4j.DirectMessageJSONImpl.init(DirectMessageJSONImpl.java:68)
at twitter4j.DirectMessageJSONImpl.(DirectMessageJSONImpl.java:57)
at twitter4j.DirectMessageJSONImpl.createDirectMessageList(DirectMessageJSONImpl.java:222)
at twitter4j.JSONImplFactory.createDirectMessageList(JSONImplFactory.java:192)
at twitter4j.TwitterImpl.getDirectMessages(TwitterImpl.java:269)
at com.inrev.bms.akka.tdm.IRTdmAkkaConsumer$TdmWorkerClass.fetchAndIndex(IRTdmAkkaConsumer.java:176)
at com.inrev.bms.akka.tdm.IRTdmAkkaConsumer$TdmWorkerClass.processMessage(IRTdmAkkaConsumer.java:134)
at com.inrev.bms.akka.tdm.IRTdmAkkaConsumer.handleData(IRTdmAkkaConsumer.java:63)
at com.inrev.akka.ThrottleConsumer.handleMsg(ThrottleConsumer.java:208)
at com.inrev.akka.ThrottleConsumer$2.apply(ThrottleConsumer.java:151)
at akka.actor.ActorCell$$anonfun$become$1.applyOrElse(ActorCell.scala:534)
at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:97)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
at akka.actor.ActorCell.invoke(ActorCell.scala:487)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254)
at akka.dispatch.Mailbox.run(Mailbox.scala:221)
at akka.dispatch.Mailbox.exec(Mailbox.scala:231)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)


#2

Thanks, I’m looking into a report of an issue with the DM API at the moment. You’ve filed this in the Fabric category, but it looks like you’re using Twitter4J and not Twitter Kit, is that correct?


#3

Yes, mistakenly I have tagged fabric.


#4

OK, thanks - moved to REST API.

We are working on understanding what happened here, thanks for your patience.


#5

There was a small fix in Twitter4J in URLEntityJSONImpl: https://github.com/yusuke/twitter4j/pull/245/files not sure if this is the error. The latest 4.0.5-SNAPSHOT hasn’t updated with the change yet - but might be worth trying the github master https://github.com/yusuke/twitter4j


#6

In parallel, we rolled back the change that caused this issue. Apologies.


#7

We’re seeing the same error for the Follow and Unfollow API as well. Any fix on that?


#8

Please open a new topic for this and include a detailed description of the behaviour you’re seeing, expected results, and any libraries you’re using. This thread was specific to a DM issue that we resolved yesterday.


#9