overtrue/socialite

facebook error

ginoking opened this issue · 5 comments

我用facebook去串接登入
結果在redirect之後報錯

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: GET https://graph.facebook.com/oauth/access_token?client_id=644619656065896&client_secret=18fa5b10023a8e827ee477d4c23639ef&code=AQCk_CoRPH63KTR_MKdjUnGJhQs6eOCPapLWl7EG76vOKfOx3Y7fslwtzrjpAVGA_CCPW9TtgR2bXy1fxPbQj7XNQwhLZ0SgwndBv7oOFVJzuZ04I-ooZDXrz1AZbQ_7Lt4V9eiHtNvgCFlJEbdVumNYXNr33R6nVEirbZ0k4XU0ibffewIn3gXRVWOZtqUBhNe5SQRA338lXaQ1PzboUQumqlqrBpNmBajcPfF8hMBIFCqJpBMrjhJ0ELlarinSvckoqHGsLXgZSdOMwamFg49YY0U6m-xcdoYid6nBwrP30tpggraUTp0Tb7CrwWSwsksPpBIbwb_KVq28Ppzd4Dbf&redirect_uri=https%3A%2F%2Flocalhost%2Fget.php resulted in a 400 Bad Request response: {"error":{"message":"This authorization code has expired.","type":"OAuthException","code":100,"error_subcode":36007,"fbt (truncated...) in /Users/gino/Desktop/login_test/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0

請問是facebook的授權碼過期了嗎?
還是有哪裡做錯了?

This authorization code has expired

重新執行之後換出現
Uncaught TypeError: Typed property Overtrue\Socialite\Exceptions\AuthorizeFailedException::$body must be array, GuzzleHttp\Psr7\Stream used in /Users/gino/Desktop/login_test/vendor/overtrue/socialite/src/Exceptions/AuthorizeFailedException.php:17 Stack trace: #0 /Users/gino/Desktop/login_test/vendor/overtrue/socialite/src/Providers/Base.php(285): Overtrue\Socialite\Exceptions\AuthorizeFailedException->construct('Invalid token r...', Object(GuzzleHttp\Psr7\Stream)) #1 /Users/gino/Desktop/login_test/vendor/overtrue/socialite/src/Providers/Facebook.php(45): Overtrue\Socialite\Providers\Base->normalizeAccessTokenResponse(Object(GuzzleHttp\Psr7\Stream)) #2 /Users/gino/Desktop/login_test/vendor/overtrue/socialite/src/Providers/Base.php(65): Overtrue\Socialite\Providers\Facebook->tokenFromCode('AQDP1LKapgRh_F...') #3 /Users/gino/Desktop/login_test/get.php(21): Overtrue\Socialite\Providers\Base->userFromCode('AQDP1LKapgRh_F...') #4 {main} thrown in /Users/gino/Desktop/login_test/vendor/overtrue/socialite/src/Exceptions/AuthorizeFailedException.php on line 17

請問是什麼問題呢?

感謝

@ginoking 正常了没?