twitter4j

Signin with Twitter stopped working suddenly

江枫思渺然 提交于 2020-01-07 02:13:30
问题 I have a web application which uses Twitter's OAUTH to login users. I am using Twitter4J version 2.1.11 This application has been working flawlessly and stopped working very recently, possibly in the past couple of weeks. public static void authWithTwitter() { try { Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET); RequestToken requestToken = twitter.getOAuthRequestToken(getTwitterCallbackUrl()); // save requestToken

Signin with Twitter stopped working suddenly

让人想犯罪 __ 提交于 2020-01-07 02:12:31
问题 I have a web application which uses Twitter's OAUTH to login users. I am using Twitter4J version 2.1.11 This application has been working flawlessly and stopped working very recently, possibly in the past couple of weeks. public static void authWithTwitter() { try { Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET); RequestToken requestToken = twitter.getOAuthRequestToken(getTwitterCallbackUrl()); // save requestToken

Why java.util.concurrent.RejectedExecutionException using Twitter4J to sample tweets, when I restart twitterStream?

自古美人都是妖i 提交于 2020-01-06 20:11:03
问题 In the following java application, I use TwitterStream to gather tweets using sample function. I need to start and stop the stream whenever user wants, but I get the following exception: java.util.concurrent.RejectedExecutionException: Task twitter4j.StatusStreamBase$1@74e75335 rejected from java.util.concurrent.ThreadPoolExecutor@5117b235[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy

Android Twitter4j getting error while retweet or send message

夙愿已清 提交于 2020-01-04 13:46:09
问题 I am making an app for twitter integration using Twitter4j API. Right now my problem is, when i tried to make retweet or send direct messages like: twitter.retweetStatus(sid); twitter.sendDirectMessage(uid, msg); i got the following error: > 08-20 11:11:17.409: WARN/System.err(233): 403:The request is > understood, but it has been refused. An accompanying error message > will explain why. This code is used when requests are being denied due > to update limits > (http://support.twitter.com

Apache Zeppelin 0.6.1: Run Spark 2.0 Twitter Stream App

送分小仙女□ 提交于 2020-01-04 06:34:32
问题 I have a cluster with Spark 2.0 and Zeppelin 0.6.1 installed. Since the class TwitterUtils.scala is moved from Spark project to Apache Bahir, I can't use the TwitterUtils in my Zeppelin notebook anymore. Here the snippets of my notebook: Dependency loading: %dep z.reset z.load("org.apache.bahir:spark-streaming-twitter_2.11:2.0.0") DepInterpreter(%dep) deprecated. Remove dependencies and repositories through GUI interpreter menu instead. DepInterpreter(%dep) deprecated. Load dependency through

What is the most effective way to get a list of followers using Twitter4j?

谁说胖子不能爱 提交于 2020-01-02 10:22:23
问题 I am using the Twitter4j library and I am trying to get the followers list of the authenticated user. I am doing the following: IDs followersIds = mTwitter.getFollowersIDs(-1); long [] ids = followersIds.getIDs(); List<User> followers = new ArrayList<User>(); for(int i = 0; i < ids.length; i++) { followers.add(mTwitter.showUser(ids[i])); } Although this may work, it's far from being effective since it sends one request for each follower. Besides the slowness of this method, I ultimately get

Twitter4j authentication credentials are missing

百般思念 提交于 2019-12-30 18:06:51
问题 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 ConfigurationBuilder(); cb.setDebugEnabled(true) .setOAuthConsumerKey(CONSUMER_KEY) .setOAuthConsumerSecret(CONSUMER_SECRET) .setOAuthAccessToken(ACCESS_KEY) .setOAuthAccessTokenSecret(ACCESS_SECRET); TwitterFactory tf = new TwitterFactory(cb.build()); Twitter twitter = new

Twitter4j authentication credentials are missing

天大地大妈咪最大 提交于 2019-12-30 18:06:36
问题 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 ConfigurationBuilder(); cb.setDebugEnabled(true) .setOAuthConsumerKey(CONSUMER_KEY) .setOAuthConsumerSecret(CONSUMER_SECRET) .setOAuthAccessToken(ACCESS_KEY) .setOAuthAccessTokenSecret(ACCESS_SECRET); TwitterFactory tf = new TwitterFactory(cb.build()); Twitter twitter = new

Why the method getOAuthAccessToken always fire the exception in the twitter4j api?

删除回忆录丶 提交于 2019-12-30 02:14:32
问题 I'm following a lot of instructions to make a simple tweet from my app. I've already registered it on Twitter, but I just can't make a tweet. I can login, but not update my status. Here's the code to login private void twitterLogOn() { Twitter twitter = new TwitterFactory().getInstance(); try { twitter.setOAuthConsumer(consumerKey, consumerSecret); rToken = twitter.getOAuthRequestToken(myCallBack); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(rToken.getAuthenticationURL()))); }

Twitter API returns invalid callback - Cannot authorize

隐身守侯 提交于 2019-12-29 08:23:16
问题 [SOLVED, but I'm open to new suggestions...] I'm integrating Twitter into my Android app using twitter4j. When I try to authorize with Twitter, I am calling the following endpoint with my oauth token: https://api.twitter.com/oauth/authenticate?oauth_token=MY_VALID_TOKEN which should redirect me to: MY-CALLBACK:///?oauth_token=***&oauth_verifier=*** but instead, it redirects me to: https://api.twitter.comMY-CALLBACK///?oauth_token=***&oauth_verifier=*** which is obviously not a valid url.