Open ghost opened 7 years ago
Hey,
I'm sorry I can't help you, but I'm wondering how you managed to setup OAuth2 to work with this repository. Even though it still doesn't work properly, mine gives me an error as soon as I click on "authorize".
I've got Notice: Undefined variable: getOldTokenFromMemory
and Call to a member function getRefreshToken() on null
and I don't understand the reason behind it.
@Tokipudi That is, because the var $getOldTokenFromMemory
is not even declared. Just replace it with $token
and it'll work.
To @ghost , if you don't include (part of) your code, we can't help you here.
Hello, I have created the script and logged in with Discord. However when I try to display any info nothing appears on the page. The error is:
[Thu Jul 27 11:46:53.443231 2017] [:error] [pid 9322] [client 86.147.162.220:54462] PHP Fatal error: Uncaught TypeError: Argument 1 passed to League\\OAuth2\\Client\\Provider\\AbstractProvider::getResourceOwner() must be an instance of League\\OAuth2\\Client\\Token\\AccessToken, string given, called in /var/www/lukehallett.space/discord/index.php on line 16 and defined in /var/www/lukehallett.space/discord/vendor/league/oauth2-client/src/Provider/AbstractProvider.php:774\nStack trace:\n#0 /var/www/lukehallett.space/discord/index.php(16): League\\OAuth2\\Client\\Provider\\AbstractProvider->getResourceOwner('UG1aOFiWKZDitTg...')\n#1 {main}\n thrown in /var/www/lukehallett.space/discord/vendor/league/oauth2-client/src/Provider/AbstractProvider.php on line 774