2016-07-19 4 views
0

のルート/ API /プロフィール/さえずりを打つとき:https://github.com/watson-developer-cloud/personality-insights-nodejs500エラー私はフォークと、このレポをクローニングし、IBMワトソン人格洞察アプリケーション

それはで述べてように私はcredentials.jsonファイルで私のコンシューマーキー&シークレットを追加しました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

あなたはTwitterの呼び出しで401を取得していますか? Twitterアクセス​​を設定する手順は、「Twitterアプリケーションの設定」の見出しの下にあるリンクのレポへの指示に記載されています。

+0

こんにちはチャット、返信いただきありがとうございます。もう一度チェックしたところ、実際にTwitterにサインインしようとしているときに500エラーが発生していると思われ、他のツイートを読んでいるときに401エラーが表示されます。私はREADMEの指示を読みましたが、まだこの問題が発生しています。 – socialpiranha

+0

twitterコールバック(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

関連する問題