
リストxammpをつかってlaravelを使っています。
下記の質問をしたのですが、その後何とか自力でエラー画面まで来ました。
このエラーは認証のエラーでしょうか?
ツイッターの開発者アカウントのIDとseacretIDが間違っているという事ですか?
マイグレーションなどすべて終わってから上記を見つけて記載したのですが、それらの処理が終わってからIDを最後に入れてはいけないという事でしょうか?
League \ OAuth1 \ Client \ Credentials \ CredentialsException Received HTTP status code [401] with message "{"errors":[{"code":32,"message":"Could not authenticate you."}]}" when getting temporary credentials.
*Server.php
```ここに言語を入力
$_clientCredentials->setCallbackUri($clientCredentials['callback_uri']);
}
return $_clientCredentials; } /** * Handle a bad response coming back when getting temporary credentials. * * @param BadResponseException $e * * @throws CredentialsException */ protected function handleTemporaryCredentialsBadResponse(BadResponseException $e) { $response = $e->getResponse(); $body = $response->getBody(); $statusCode = $response->getStatusCode(); throw new CredentialsException( "Received HTTP status code [$statusCode] with message \"$body\" when getting temporary credentials." ); } /** * Creates temporary credentials from the body response. * * @param string $body * * @return TemporaryCredentials */ protected function createTemporaryCredentials($body) { parse_str($body, $data); if (!$data || !is_array($data)) { throw new CredentialsException('Unable to parse temporary credentials response.'); } if (!isset($data['oauth_callback_confirmed']) || $data['oauth_callback_confirmed'] != 'true') {
Arguments
"Received HTTP status code [401] with message "{"errors":[{"code":32,"message":"Could not authenticate you."}]}" when getting temporary credentials."
envファイルに下記二つのキーを入れていますが間違っていますか? Consumer Key (API Key) iw~ Consumer Secret (API Secret) Ous~ ・元の質問 >>>> laravelのフォルダの場所をデフォルトから下記に変更しています。 Desktop\php\project1 下記を参考にoauthを行ているのですが、 https://www.ritolab.com/entry/33 http://localhost:8000/oauth/twitter とアクセスしても ・表記結果 うまくいっているかな? Sorry, the page you are looking for could not be found. という画面が出てしまいます。 ・web.php ```ここに言語を入力 <!doctype html> <html> <head> <title>Sample</title> <style> body { color:gray; } h1 { font-size:18pt; font-weight:bold; } </style> </head> <body> うまくいっているかな? </body> <?php //Twitter Route::get('auth/twitter', 'OAuthLoginController@getAuth'); Route::get('auth/callback/twitter', 'OAuthLoginController@authCallback'); //Facebook // Route::get('auth/facebook', 'OAuthLoginController@getAuth'); // Route::get('auth/callback/facebook', 'OAuthLoginController@authCallback');
・私が行った過程の一部
project1>php artisan make:controller OAuthLoginController <!doctype html> <html> <head> <title>Sample</title> <style> body { color:gray; } h1 { font-size:18pt; font-weight:bold; } </style> </head> <body> debu22 <h1>Sample</h1> <p>dai</p> </body> Controller created successfully. \project1>php artisan make:controller OAuthLoginController <!doctype html> <html> <head> <title>Sample</title> <style> body { color:gray; } h1 { font-size:18pt; font-weight:bold; } </style> </head> <body> debu22 <h1>Sample</h1> <p>dai</p> </body> Controller already exists! project1>php artisan serve <!doctype html> <html> <head> <title>Sample</title> <style> body { color:gray; } h1 { font-size:18pt; font-weight:bold; } </style> </head> <body> debu22 <h1>Sample</h1> <p>dai</p> </body> Laravel development server started: <http://127.0.0.1:8000> [Wed Jan 3 14:46:06 2018] 127.0.0.1:51767 [200]: /favicon.ico [Wed Jan 3 14:46:07 2018] 127.0.0.1:51772 [200]: /favicon.ico [Wed Jan 3 16:42:22 2018] 127.0.0.1:55319 Invalid request (Unexpected EOF) [Thu Jan 4 13:12:38 2018] 127.0.0.1:51240 Invalid request (Unexpected EOF) [Thu Jan 4 13:13:39 2018] 127.0.0.1:51268 Invalid request (Unexpected EOF)
理由がわかる人がいましたら教えていただければ幸いです。
>>>>>>>
その後
project1\resources\views
を見たところauthとうフォルダが見当たりません。
ここに自動的に作られるはずなのでしょうか?

回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。