Fitbit Provider for OAuth 2.0 Client更新了写法
获取API方法修改
旧版
1 2 3 4 5 6 7 |
$request = $provider->getAuthenticatedRequest( 'GET', Fitbit::BASE_FITBIT_API_URL . '/1/user/-/profile.json', $accessToken, ['headers' => ['Accept-Language' => 'en_US'], ['Accept-Locale' => 'en_US']] ); $response = $provider->getResponse($request); |
新版
1 2 3 4 5 6 7 |
$request = $provider->getAuthenticatedRequest( Fitbit::METHOD_GET, Fitbit::BASE_FITBIT_API_URL . '/1/user/-/profile.json', $accessToken, ['headers' => [Fitbit::HEADER_ACCEPT_LANG => 'en_US'], [Fitbit::HEADER_ACCEPT_LOCALE => 'en_US']] ); $response = $provider->getParsedResponse($request); |
旧版API如果不更新,运行后会出现500错误
There are no comments yet