twitter4j

Flume HDFS sink keeps rolling small files

喜欢而已 提交于 2019-11-29 16:43:25
I'm trying to stream twitter data into hdfs using flume and this: https://github.com/cloudera/cdh-twitter-example/ Whatever I try here, it keeps creating files in HDFS that range in size from 1.5kB to 15kB where I would like to see large files (64Mb). Here is the agent configuration: TwitterAgent.sources = Twitter TwitterAgent.channels = MemChannel TwitterAgent.sinks = HDFS TwitterAgent.sources.Twitter.type = com.cloudera.flume.source.TwitterSource TwitterAgent.sources.Twitter.channels = MemChannel TwitterAgent.sources.Twitter.consumerKey = xxxxxx TwitterAgent.sources.Twitter.consumerSecret =

When adding dependency: CDI deployment failure, Unsatisfied dependencies for type Set<Service> with qualifiers @Default

烈酒焚心 提交于 2019-11-29 15:23:08
When I add the twitter hbc dependency to my pom.xml I'm getting an error. I followed the instructions from here. I don't get it, if it was a dependency problem I should have found a fix on the web but if I comment out that dependency, my server is starting.. this is my what I added to my pom.xml: <dependency> <groupId>com.twitter</groupId> <artifactId>hbc-core</artifactId> <!-- or hbc-twitter4j --> <version>2.2.0</version> <!-- or whatever the latest version is --> </dependency> This is the error: 2015-06-20T18:13:52.877+0200|Severe: Exception while loading the app : CDI deployment failure

Android Twitter4j giving error NoClassDefFoundError: twitter4j.TwitterFactory

故事扮演 提交于 2019-11-29 15:19:33
问题 I am making an app that communicates with Twitter to post a tweet. My problem is that when compile my code, I get the error message: NoClassDefFoundError: twitter4j.TwitterFactory Here is the code that post's the tweet via an onClickListener: post.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub Twitter twitter = new TwitterFactory().getInstance(); AccessToken a = new AccessToken("****", "****"); twitter.setOAuthConsumer("****",

Service provider responded in error: 301 (Moved Permanently) - Twitter API 1.1

别来无恙 提交于 2019-11-29 13:16:54
I get this error when trying to connect to Twitter? Why? 02-18 16:40:33.270: W/System.err(7167): oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Service provider responded in error: 301 (Moved Permanently) 02-18 16:40:33.270: W/System.err(7167): at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:218) 02-18 16:40:33.270: W/System.err(7167): at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:74) 02-18 16:40:33.270: W/System.err(7167): at app.jp.cropnet.twitter.TwitterApp$2.run

Twitter API returns invalid callback - Cannot authorize

a 夏天 提交于 2019-11-29 13:01:57
[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. (Also, the : is missing - it should be MY-CALLBACK:///... ) Please note I'm using WebView for my calls I

Android, Twitter, 'FOLLOW US'

浪子不回头ぞ 提交于 2019-11-29 11:51:43
I am building an android application and I am stuck at one place. I have integrated Twitter in my app using twitter4j, signpost apis. I am successful in writing code for putting text in user profile but I also want the user to follow my app when they click 'follow us on twitter' button. Can anybody give me reference or guidance of writing such code? What you are probably looking for is createFriendship() You can see how it is used here 2016 Edit: Google code svn is broken and twitter 4j has moved http://twitter4j.org/en/api-support.html 来源: https://stackoverflow.com/questions/7752387/android

Getting “err” : \"E11000 duplicate key error when inserting into mongo using the Java driver

旧巷老猫 提交于 2019-11-29 06:21:46
Exception in thread "main" com.mongodb.MongoException$DuplicateKey: { "serverUsed" : "localhost/127.0.0.1:27017" , "err" : "E11000 duplicate key error index: twitterdb03.LevelAFollowers.$ id dup key: { : ObjectId('52d5636de408652b4853a8fe') }" , "code" : 11000 , "n" : 0 , "connectionId" : 12 , "ok" : 1.0} I'm using mongo 2.11.1 Never had problems with simple write operations in java myMap.put(inid, followersList); myObj.putAll(myMap); myIdMapCollection.insert(myObj); I found an answer on this page . I’m guessing your code looks something like this (greatly simplified)?: doc = {} for i in

android twitter retrieveRequestToken 401 on request token

对着背影说爱祢 提交于 2019-11-29 03:44:21
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, CONSUMER_SECRET); provider = new DefaultOAuthProvider("http://twitter.com/oauth/request_token", "http://twitter.com/oauth/access_token", "http://twitter.com/oauth/authorize"); String authUrl = provider.retrieveRequestToken(consumer, CALLBACK_URL); Toast.makeText(this, "Please authorize this app!", Toast.LENGTH_LONG).show(); this.startActivity(new Intent(Intent.ACTION_VIEW, Uri

Twitter4J + Android: Authentication Challenge is Null Exception

让人想犯罪 __ 提交于 2019-11-29 03:33:36
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 { twitter.setOAuthConsumer(Startup.TWITTER_KEY, Startup.TWITTER_SECRET); String callbackURL = "twitter-client:///"; RequestToken rToken = twitter.getOAuthRequestToken(callbackURL); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(rToken.getAuthenticationURL()))); } catch(IllegalStateException e) { // access token is already available, or consumer key/secret is

android twitter4j authentication via installed twitter app not browser

爷,独闯天下 提交于 2019-11-29 02:04:06
i am using twitter4j in my android application to post status to twitter like in this example: http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/ All is working good but the question is: The authentication is done via browser .. is there any way to detect if twitter app already installed on mobile and authenticate via it ? Thanks. EDITED: November 27, 2014 Twitter recently released Fabric that does include SSO support. From the Android docs : When attempting to obtain an authentication token, the Kit will use the locally installed Twitter app to offer a single sign-on