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
8
votes
2 answers

Retrieve the user profile image from twitter

I am using the Twitter4J API in Java to retrieve the profile image for a Twitter user whose logged in. The command is something like : twitter.getProfileImage(twitter.getScreenName(), Imagesize); What is the image size? How can I display the…
AhmadAssaf
  • 3,556
  • 5
  • 31
  • 42
8
votes
2 answers

Rate Limit Exceeded - Custom Twitter app

I am working with a java Twitter app (using Twitter4J api). I have created the app and can view the current users timeline, user's profiles, etc.. However, when using the app it seems to quite quickly exceed the 150 requests an hour rate limit set…
rhinds
  • 9,976
  • 13
  • 68
  • 111
8
votes
5 answers

twitter not working with twitter4j in android

I am using twitter4j to integrate twitter in android. This is my code to for twitter. I am creating separate class for twitter. I looked at similar questions to this but nothing works for me. Question and some other questions. Twitter class public…
keen
  • 3,001
  • 4
  • 34
  • 59
8
votes
3 answers

How to use Twitter4j api to reply on a tweet?

I am working on twitter, I have access token and I am also getting the tweets now I want to reply on that tweets like we did in Twitter website for this I am using the below code but it's not reply to the tweet but it updates my status please help…
user1445057
  • 101
  • 1
  • 5
8
votes
1 answer

How I can get all the text of a tweet that's been retweeted and extends 140 chars?

I have started learning Twitter4j API and have got all credentials and tokens from Twitter to use it. I am using twitter4j API version 2.2.5. I am able to get my own timeline using a simple java program and print it on console. I am able to get all…
vikiiii
  • 9,246
  • 9
  • 49
  • 68
7
votes
4 answers

How to create mock Status object in twitter4j?

I am using twitter4j and developing StatusListener class and need a way to just create a mock Status object so I can test my class. I don't want to have to actually connect to the API while I am developing. Is there a way to create a Status…
Dmitri
  • 34,780
  • 9
  • 39
  • 55
7
votes
1 answer

Not able to register webhook via postman in twitter app

https://api.twitter.com/1.1/account_activity/all/prod/webhooks.json?url=https://test.com not working I have followed all steps to create a new application and getting consumer key, secret keys and also token details and try to create webhook via…
Kannan Thangadurai
  • 1,117
  • 2
  • 17
  • 36
7
votes
1 answer

What's with "4J" and "J" in database / API names

I have used Twitter4j, linkedin-j and I'm looking at Neo4j and Bio4j. I've also seen "Log4j" and many other database related names with "j" and "4j" in them. I've been looking and I can't find anything that explains the "j" reference. What's with…
Jim
  • 10,172
  • 1
  • 27
  • 36
7
votes
2 answers

Twitter4j authentication credentials are missing

I would like to make a tweet with Twitter4j in my Android app. Here is my code: //TWITTER SHARE. @Click (R.id. img_btn_twitter) @Background public void twitterPostWall(){ try { //Twitter Conf. ConfigurationBuilder cb = new…
Nizar B.
  • 3,098
  • 9
  • 38
  • 56
7
votes
4 answers

How can I get a Twitter public timeline with no user authentication using Twitter4j?

I've wrote some code to allow a user to login to his Twitter account and send Tweet using Twitter4j and following this tutorial. Now I can also get the tweets of a public account using ConfigurationBuilder cb = new…
jul
  • 36,404
  • 64
  • 191
  • 318
7
votes
2 answers

Having multiple Twitter instances with twitter4j library.

I need to be able to make different Twitter instances with same consumer key and secret but different user level access tokens. I have already obtained the access tokens for 10 users based on consumer credentials of my app by using standard Twitter…
VaidAbhishek
  • 5,895
  • 7
  • 43
  • 59
7
votes
2 answers

How to change keywords on twitter stream api using twitter4j?

I am using twitter4j to connect to Stream API. I understand that from this post, Change Twitter stream filter keywords without re-opening stream, there is no way to change keywords while the connection is open. I have to disconnect and change the…
ktlim
  • 249
  • 1
  • 6
  • 15
6
votes
7 answers

Friends list of a friend using Twitter4J

How can I obtain the friends list of a friend or follower using Twitter4J? Using getFriendsId(), I'm only able to retrieve the friend's/follower's list of that current user which is authenticated. What I want is to obtain the list of friends of a…
sandeepsharat
  • 97
  • 1
  • 3
  • 10
6
votes
3 answers

Android: Login with Twitter using Twitter4J

What I Have Tried: I already have registered an app in twitter and got Consumer Key and Secret.Even I got various codes to login with twitter.These are what I have tried…
Hiral Vadodaria
  • 19,158
  • 5
  • 39
  • 56
6
votes
3 answers

Go back after call Intent.ACTION_VIEW in android

My app has 3 activity A, B, C. Activity A calls B. In B, I call Intent.ACTION_VIEW to do authentication with Twitter as below: public static void DoAuthen(Context context, String CallBackUrl) throws OAuthMessageSignerException,…
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165