Skip to content

Commit cd5b656

Browse files
committed
Update TikTok.php
1 parent 84d86ab commit cd5b656

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Client/TikTok.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,28 @@ public function getCurrentUserJsonArray(
4343
if (strlen($body) > 0) {
4444
return (array) json_decode($body, true);
4545
}
46-
} catch (\Throwable $e) {
46+
} catch (\Throwable) {
4747
// Optionally log error: $e->getMessage()
4848
return [];
4949
}
5050

5151
return [];
5252
}
53+
54+
protected function initUserAttributes(): array
55+
{
56+
$token = $this->getAccessToken();
57+
if ($token instanceof OAuthToken) {
58+
return $this->getCurrentUserJsonArray($token);
59+
}
60+
return [];
61+
}
62+
63+
#[\Override]
64+
public function getButtonClass(): string
65+
{
66+
return '';
67+
}
5368

5469
/**
5570
* @return string
@@ -62,11 +77,13 @@ protected function getDefaultScope(): string
6277
return 'user.info.profile';
6378
}
6479

80+
#[\Override]
6581
public function getName(): string
6682
{
6783
return 'tiktok';
6884
}
6985

86+
#[\Override]
7087
public function getTitle(): string
7188
{
7289
return 'TikTok';

0 commit comments

Comments
 (0)