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
36
votes
9 answers

Why this error ' - Read-only application cannot POST '

Logcat: 12-05 23:37:01.721:W/System.err(534): 401:Authentication credentials (https://dev.twitter.com/docs/auth) were missing or incorrect. Ensure that you have set valid conumer key/secret, access token/secret, and the system clock in in…
sayem siam
  • 1,281
  • 3
  • 13
  • 26
28
votes
3 answers

Get tweets of a public twitter profile

I have a list of usernames on Twitter whose profiles are public. I wish to get "all the tweets" they have posted from the day they formed their profile. I checked Twitter4J examples on GitHub. According to the Twitter API documentation, only the 20…
Dexter
  • 11,311
  • 11
  • 45
  • 61
17
votes
5 answers

Android Twitter integration using oauth and twitter4j

I want to integrate twitter in an android application and found many tutorials. Implemented 2 of them. But after implementing, when ran the application, I came to know that they use older version of twitter4J library. Although plenty other tutorials…
Geek
  • 8,280
  • 17
  • 73
  • 137
17
votes
1 answer

Filter twitter4j stream

I'm trying to filter my twitter4j stream with the following code : TwitterStream twitterStream = getTwitterStreamInstance(); // Listener twitterStream.addListener(listener); // Filter FilterQuery filtre = new FilterQuery(); …
Apaachee
  • 900
  • 2
  • 10
  • 32
16
votes
3 answers

How to retrieve a twitter user's name using Twitter 4j

I'm new to android development (and java in general). I'm building an application that requires a user to signup by logging-in to their twitter account from where their basic information is imported and saved. The information required would be…
nchima
  • 163
  • 1
  • 1
  • 5
16
votes
5 answers

How to wrap (float) cards in bootstrap 4

I am using bootstrap 4 beta. I have a list of cards. I want them to be of fixed width, but the height will be variable depending on the content. The number of cards can be from 1 to n. The effect I want is for the cards to be be laid out from left…
Greg Gum
  • 33,478
  • 39
  • 162
  • 233
15
votes
2 answers

Stop streaming context in Spark Streaming after a period of time

I building an application which receives DStreams from Twitter, the only way to stop the Streaming context is by stoping the execution. I wonder if there is a way to set a time and terminate the streaming socket without stoping the entire…
user4658980
15
votes
7 answers

Is it possible to get more than 100 tweets?

Is it possible to get more than 100 tweets using the Twitter4j API? If so can anyone point out the way to do so??
15
votes
2 answers

Twitter4j : Search for public tweets

How does one search within public tweets using the Twitter4j library ? public static void main(String[] args) { Twitter twitter = new TwitterFactory().getInstance(); try { Query query = new Query("Cocaine"); …
Stormshadow
  • 6,769
  • 9
  • 33
  • 34
14
votes
6 answers

Twitter4J + Android: Authentication Challenge is Null Exception

I'm using Twitter4J library for OAuth authentication but I get "Authentication Challenge is Null Exception" even before It opens the Twitter login page. Here is the code. Twitter twitter = new TwitterFactory().getInstance(); try { …
Sharjeel
  • 15,588
  • 14
  • 58
  • 89
14
votes
1 answer

Spark Streaming get warn "replicated to only 0 peer(s) instead of 1 peers"

I use spark streaming to receive twitts from twitter. I get many warning that says: replicated to only 0 peer(s) instead of 1 peers what is this warning for? my code is: SparkConf conf = new SparkConf().setAppName("Test"); …
Arman
  • 1,019
  • 2
  • 14
  • 33
13
votes
6 answers

android twitter retrieveRequestToken 401 on request token

I am trying the following sample app for twitter oauth. http://www.androidsdkforum.com/android-sdk-development/3-oauth-twitter.html private void askOAuth() { try { consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY,…
d-man
  • 57,473
  • 85
  • 212
  • 296
13
votes
3 answers

twitter connection failed

In Android, Twitter connection failed. SSL is required? My code was working perfectly and it is currently a live application. However, since 2014 it hasn't been working and I've heard that Twitter has applied https or using SSL concept. help me to…
Bhavesh Jethani
  • 3,891
  • 4
  • 24
  • 42
12
votes
3 answers

Segregating filtered tweets based on matched keywords : Twitter4j API

I have created twitter stream filtered by some keywords as follows. TwitterStream twitterStream = getTwitterStreamInstance(); FilterQuery filtre = new FilterQuery(); String[] keywordsArray = { "iphone", "samsung" , "apple",…
Nicool
  • 259
  • 1
  • 7
11
votes
3 answers

How can I follow a twitter user using Twitter4j framework?

I need my Java Twitter application to be able to follow a user in twitter. When I pass it the user ID as a string, the application follow it automatically. I couldn't find the method that can do that in Twitter4j.
Walllzzz
  • 550
  • 1
  • 5
  • 16
1
2 3
99 100