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.
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.
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.
Joined: Jul 07, 2012
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.
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.
subject: No response received on sending request to get tweets from Twitter using twitter4j API with token.