fix getUser method
This commit is contained in:
parent
7819b19d1c
commit
104f976f1b
1 changed files with 2 additions and 5 deletions
|
@ -206,16 +206,13 @@ class Dailymotion extends OAuth2
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getUser(string $accessToken) : array
|
||||
protected function getUser(string $accessToken): array
|
||||
{
|
||||
if (empty($this->user)) {
|
||||
$user = $this->request(
|
||||
'GET',
|
||||
$this->endpoint . '/user/me?',
|
||||
$this->endpoint . '/user/me?fields=' . \implode(',', $this->getFields()),
|
||||
['Authorization: Bearer ' . \urlencode($accessToken)],
|
||||
\http_build_query([
|
||||
'fields' => \implode(' ', $this->getFields())
|
||||
])
|
||||
);
|
||||
$this->user = \json_decode($user, true);
|
||||
\var_dump($this->user);
|
||||
|
|
Loading…
Reference in a new issue