/** * Since Withings has their own unique implementation of oAuth, we need to override * the fetchUserDetails-method and add the oauth headers as querystrings. * * {@inheritDoc} */ protected function fetchUserDetails(TokenCredentials $tokenCredentials, $force = true) { if (!$this->cachedUserDetailsResponse || $force) { // The user-endpoint $endpoint = 'http://wbsapi.withings.net/user'; // Parse the parameters $parameters = $this->getOauthParameters($endpoint, $tokenCredentials, array('action' => 'getbyuserid')); // Set the urlUserDetails so the parent method can call it via $this->urlUserDetails(); $this->urlUserDetails = $endpoint . '?' . http_build_query($parameters); } // Call the parent when we're done return parent::fetchUserDetails($tokenCredentials, $force); }