芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/network.digitalhubbd.com/fns/hybridauth/Provider/Medium.php
isRefreshTokenAvailable()) { $this->tokenRefreshParameters += [ 'client_id' => $this->clientId, 'client_secret' => $this->clientSecret, ]; } } /** * {@inheritdoc} * * See: https://github.com/Medium/medium-api-docs#getting-the-authenticated-users-details */ public function getUserProfile() { $response = $this->apiRequest('me'); $data = new Data\Collection($response); $userProfile = new User\Profile(); $data = $data->filter('data'); $full_name = explode(' ', $data->get('name')); if (count($full_name) < 2) { $full_name[1] = ''; } $userProfile->identifier = $data->get('id'); $userProfile->displayName = $data->get('username'); $userProfile->profileURL = $data->get('imageUrl'); $userProfile->firstName = $full_name[0]; $userProfile->lastName = $full_name[1]; $userProfile->profileURL = $data->get('url'); return $userProfile; } }