2016-07-19 3 views
0

IBM 왓슨 성격 통찰력 응용 프로그램의 노선/API/프로필/트위터 타격 때 :이 글은 주장처럼이 credentials.json 파일에 내 소비자 키 & 비밀을 추가 한 https://github.com/watson-developer-cloud/personality-insights-nodejs500 오류가 나는 갈래이 REPO 복제 한

README 그러나 나는 500 Error을 얻고 있습니다. 문제는 내 액세스 토큰 & 액세스 토큰 비밀을 포함시켜야한다는 것이지만 그것이 어디에 포함되는지는 분명하지 않다고 생각합니다.

여기

내가 얻을 500 Error (참고 : 나는 민감한 경로와 변수 대체)입니다

GET /auth/twitter? 302 227.700 ms - 0 
error: Error: Failed to find request token in session 
    at SessionStore.get (/project/node_modules/passport-oauth1/lib/requesttoken/session.js:13:44) 
    at Strategy.OAuthStrategy.authenticate (/project/node_modules/passport-oauth1/lib/strategy.js:214:33) 
    at Strategy.authenticate (/project/node_modules/passport-twitter/lib/strategy.js:87:40) 
    at attempt (/project/node_modules/passport/lib/middleware/authenticate.js:348:16) 
    at authenticate (/project/node_modules/passport/lib/middleware/authenticate.js:349:7) 
    at Layer.handle [as handle_request] (/project/node_modules/express/lib/router/layer.js:95:5) 
    at next (/project/node_modules/express/lib/router/route.js:131:13) 
    at Route.dispatch (/project/node_modules/express/lib/router/route.js:112:3) 
    at Layer.handle [as handle_request] (/project/node_modules/express/lib/router/layer.js:95:5) 
    at /project/node_modules/express/lib/router/index.js:277:22 
    at Function.process_params (/project/node_modules/express/lib/router/index.js:330:12) 
    at next (/project/node_modules/express/lib/router/index.js:271:10) 
    at Function.handle (/project/node_modules/express/lib/router/index.js:176:3) 
    at router (/project/node_modules/express/lib/router/index.js:46:12) 
    at Layer.handle [as handle_request] (/project/node_modules/express/lib/router/layer.js:95:5) 
    at trim_prefix (/project/node_modules/express/lib/router/index.js:312:13) 'url:' '/auth/twitter/callback?oauth_token=SOME_TOKEN&oauth_verifier=SOME_VERIFIER' 'Error:' code=500, code=undefined, error=undefined 
GET /auth/twitter/callback?oauth_token=SOME_TOKEN&oauth_verifier=SOME_VERIFIER 500 6.464 ms - 23 

나는 또한 내가의 Oauth없이 다른 사람의 트윗 에 액세스하려고 오전 401 Error 수를, 특히 나는이 오류가 발생합니다 :

error: { code: 401, 
error: 'Unauthorized: Access is denied due to invalid credentials' }  'url:' '/api/profile/twitter' 
'Error:' code=401, code=401, error=There was a problem processing the personality. Please check your credentials. 

답변

0

당신은 트위터 통화에서 401을 얻고 있습니까? Twitter 액세스를 설정하는 방법은 'Twitter 애플리케이션 설정'제목 아래 제공된 링크의 repo에 대한 안내에 나와 있습니다.

+0

안녕하세요, 답장을 보내 주셔서 감사합니다. 내가 다시 확인했는데 실제로 트위터에 로그인하려고 할 때 500 개의 오류가 발생하고 내 트윗을 가져오고 다른 트윗을 읽을 때 (내 서명없이) 401 오류가 발생하는 것 같습니다. README에있는 지침을 읽었지만 여전히이 문제가 발생합니다. – socialpiranha

+0

트위터 콜백 (Bluemix 환경 : .mybluemix.net/auth/twitter/callback)을 등록한 경우 액세스 토큰을 제공 할 필요가 없습니다. in https://github.com/watson-developer-cloud/personality-insights-nodejs/blob/master/router/auth.js) – chughts

+0

고마워요. 콜백을 등록했는데 (로컬 환경 : http : //server.local : 3000/auth/twitter/callback), 여전히 500 오류가 발생합니다. 다른 이유는 무엇입니까? – socialpiranha