diff --git a/src/SharethisManager.php b/src/SharethisManager.php
index 674bdc3..6af318d 100644
--- a/src/SharethisManager.php
+++ b/src/SharethisManager.php
@@ -112,11 +112,11 @@ class SharethisManager implements SharethisManagerInterface {
     if ($sharethis_config->get('location') == 'block') {
       // First Get all of the options for sharethis widget from database.
       $data_options = $this->getOptions();
-      $current_path = $this->routeMatch->getRouteName() ? Url::fromRouteMatch($this->routeMatch)->getInternalPath() : '';
-      $path = isset($current_path) ? $current_path : '<front>';
-      $path_obj = Url::fromUri('base://' .$path, ['absolute' => TRUE]);
-      $m_path = $path_obj->toString();
-      $mtitle = $this->titleResolver->getTitle($this->requestStack->getCurrentRequest(), $this->routeMatch->getRouteObject());
+
+      $request = $this->requestStack->getCurrentRequest();
+      // Get an absolute path to the current page.
+      $m_path = $request->getUri();
+      $mtitle = $this->titleResolver->getTitle($request, $this->routeMatch->getRouteObject());
       $m_title = is_object($mtitle) ? $mtitle->getUntranslatedString() : $config->get('name');
       return $this->renderSpans($data_options, $m_title, $m_path);
 
