File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes No response received on sending request to get tweets from Twitter using twitter4j API with token. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "No response received on sending request to get tweets from Twitter using twitter4j API with token." Watch "No response received on sending request to get tweets from Twitter using twitter4j API with token." New topic
Author

No response received on sending request to get tweets from Twitter using twitter4j API with token.

Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 586
I am trying to fetch tweets for a particular keyword using the Twitter4J API. I am using twitter4j-core-2.2.5.jar. I pass OAuthAccessToken but on sending reuqest using the below lines I get no response:


It hangs after the third line above , without giving any response.


Here is my complete code:





thanks.




Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Why use such an old version? I would upgrade to version 3, because that is best supported by Twitter itself. I once had to spend some time upgrading an application from 2.2 to 3.0 because of the API upgrade at Twitter.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 586
Thanks.let me try the latest version.However I still do not know the reason for no response on sending request because either it would have thown an error message or a timed out message but in this case no response received. I will try version 3 and check.
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 586
thanks a lot. Just changing the API to version 3 worked for me.It is working fine. I still do not know why earlier it did not giving any response instead of timeout or error.Anyway it working fine with version 3.Thanks again.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

You're welcome.
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 586
On using the above code I am getting the response but it is contiously fetching.In such a case how do I display it on the web. I mean I kept this code into a method and returned arrayList but it does not come because it keeps fetching and fetching and I am not able to return it from a method which I plan to render on web.

thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No response received on sending request to get tweets from Twitter using twitter4j API with token.
 
Similar Threads
Sending JSON and another parameter in HTTPPost
0penJPA QueryCaching
[jersey/jax-rs] json object value string has extra quotes, jsonp, service chaining‏
transfer unserilaized objects as SOAP response