Problem accessing '/1.1/statuses/sample.json'. reason unauthorized

apachestorm
twitter4j
storm
java

#1

Hi,
i am following courses of Real-Time Analytics with Apache Storm
this is the course
https://www.udacity.com/course/viewer#!/c-ud381/l-3107548563/m-3386458630

anyway the problem is happen when i want to visualize all the tweets but my command it seems not working
storm jar target/udacity-storm-lesson1_stage1-0.0.1-SNAPSHOT-jar-with-dependencies.jar udacity.storm.TweetTopology

every time i am typing this command in the command prompt and hit enter
i get this errors

and nothing shown in my navigator “Google Chrome” 127.0.0.1:5000/

please any help will be appreciated thanks in advance


#2

I’ve not tried this exercise myself, but there are usually a couple of possible reasons for this - your machine clock is not accurate / not in line with the Twitter servers; and/or, you have not entered valid Application Keys into your code. I skimmed through the video and it looks like there’s a section around 3:30 in that video where you add your application keys. Did you do that successfully, and recompile?


#3

Yes i did everything and i’ve added all the codes if u mean those


#4

it’s a Http error 401 and from what i’ve understood is that i need to enter my username and password but i don’t know how or where


#5

No, you’ve generated access tokens, so you should not need to enter username or password, as that means your app is essentially operating with your credentials. I’m not sure then, if the clock is correct. Strange.


#6

just to confirm something, since it’s a problem with login does my login email in twitter and in the udacity course has to be the same ?


#7

The Udacity course is completely separate from Twitter so this should not be related.


#8

I’m getting the same issue at the same step of the course. I’ve tried regenerating all the keys, made sure system clock is in sync, tried updating app permissions. I still get the 401.

Is there anything else I should try or anyone figured it out yet?


#9

I haven’t tried the course but last time i worked with deploying Storm mistakes in my Maven pom.xml meant that the twitter4j.properties configuration with the keys was not properly included as a resource in the jar.

Other issues included old or conflicting versions of Twitter4J: Make sure you have

<version>[4.0,)</version> for twitter4j-core and twitter4j-stream

in your pom.xml NOT <version>[3.0,)</version> like it has on the old repo https://github.com/udacity/ud381