Questions tagged [twitter4j]

Twitter4J is a library enabling calls to the Twitter API from Java. With Twitter4J, you can easily integrate your Java application with the Twitter service. Twitter4J is an unofficial library.

With Twitter4J, you can easily integrate your Java application with the Twitter service.

Features

  • 100% Pure Java - works on any Java Platform version 5 or later
  • Android platform and Google App Engine ready
  • Zero dependency: No additional jars required
  • Built-in OAuth support
  • Out-of-the-box gzip support
  • 100% Twitter API 1.1 compatible
1563 questions
5
votes
1 answer

Retweet using Twitter4j Android

i'm trying make simple app twitter and i use twitter4j library and i got good tutorial how to login and post twitter used that library. my app display timeline and had retweet button, my question how to retweet using twitter4j library?
Frank Junior
  • 575
  • 1
  • 9
  • 19
5
votes
1 answer

Check Who I am following via Twitter4j

Is There anyway to check if I am following a certain user on Twitter other than getting the whole list of people who I am following and then start comparing Ids? What I know is getting the whole list of people I am following is done through this…
Ahmed Emad
  • 619
  • 10
  • 23
5
votes
3 answers

how to post tweet using twitter4j in java?

I am able to login to twitter using twitter4j and get information about the logged in user but i am not able to post tweet from my application. I am using java web application to post tweet. see the code below that i use. String ACCESS_TOKEN =…
Joe
  • 4,460
  • 19
  • 60
  • 106
4
votes
1 answer

android twitter 4j integration get tweet entities

I am working on twitter integration with android using Twiitter4j. I am trying to fetch Home timelines and its working fine. But when i am looking to get urls included in the tweets there is no functions. Is there a functon to get tweet entites…
i leaf
  • 273
  • 7
  • 19
4
votes
1 answer

How do I perform a twitter search using advanced parameters

http://twitter.com/search-advanced I would like to perform search queries which mimic the above screen (e.g. How do I find all tweets which satisfy "none of the words" criteria or just #hashtags criteria). Would it be possible to mix-n- match…
diya
  • 6,938
  • 9
  • 39
  • 55
4
votes
1 answer

Retrieving tweets from twitter using twitter4j

I am developing an application to guess locations of tornadoes by analyzing twitter data. For this, I would first need to train a neural network on some manually annotated tweets. I am trying to get tweets from last year which have the word…
sanz
  • 1,069
  • 1
  • 10
  • 26
4
votes
1 answer

How to get the date of each twitter favorite using twitter4j

Trying to get the date of each twitter favorite Using the following code: TwitterFactory tf = new TwitterFactory(cb.build()); Twitter twitter = tf.getInstance(); for (Status rt : twitter.getFavorites()) { System.out.println(rt); } but it returns a…
Mikhail Fayez
  • 421
  • 3
  • 15
4
votes
0 answers

"Request token or token secret not set in server reply." when attempting to get the request token

I'm using the Twitter API with Signpost and Twitter4J on Android. My code fails here: consumer = new CommonsHttpOAuthConsumer(TWITTER_KEY, TWITTER_SECRET); provider = new…
Ross
  • 46,186
  • 39
  • 120
  • 173
4
votes
3 answers

Twitter API GET user_timeline reply/comment count

Is there any way to get the comment/reply count for a tweet using GET statuses/user_timeline in addition to favorite_count and retweet_count which are already returned? Thanks!
4
votes
1 answer

Twitter API - Tweet text getting shortened with t.co

I'm using Twitter4J to get the tweets of given user. However sometimes the tweet text get shortened with ... at the end and t.co link with full text is provided. Someone have an idea what I have to do to get the full text directly within…
Sp0tlight
  • 409
  • 1
  • 4
  • 18
4
votes
2 answers

SignPost or Twitter4j for Sign-in with Twitter (OAuth)?

I read a lot about signpost, and then went back to Twitter4J with which I have created my twitter applications when OAuth wasn't necessary. I am now confused whether I should use signpost or Twitter4J's method of OAuth authentication. I have read…
Aman Alam
  • 11,231
  • 7
  • 46
  • 81
4
votes
1 answer

Trouble retrieving OEmbed object in Twitter4j

I am trying to get an OEmbed object from a Status object in Twitter4j then get the html to pass to a webpage. Right now I just have it in a main method for testing. public static void main(String[] args) { ConfigurationBuilder cf = new…
bawgz
  • 41
  • 3
4
votes
4 answers

twitter4j since id not getting updated

I am trying to use since_id to get tweets using twitter search api. Below is my code, here I am creating a map of query object and since id. I am defaulting the since id to 0 and my goal is to update the since id every time I run the query. So that…
Explorer
  • 1,491
  • 4
  • 26
  • 67
4
votes
2 answers

TwitterException {statusCode=403, retryAfter=0, rateLimitStatus=null}

I have recently noticed that I keep getting a 403 error while doing twitter search. My application was working until couple of days back when i noticed the error. I checked with Twitter & they say my IP is not blocked, I am also within the rate…
kapso
  • 11,703
  • 16
  • 58
  • 76
4
votes
3 answers

Using Twitter4j how do i get all the list of Favorited tweets by a particulate user

I want all the list of tweets which are favorited by a twitter user account. I have done some sample code that will give me all the posts that the user posted but i want all the tweets that the user favorited. public List getAllTweetsOfUser(Twitter…
Manindar
  • 999
  • 2
  • 14
  • 30