diff --git a/sharethis.module b/sharethis.module
index 1811ed3..b7027e7 100644
--- a/sharethis.module
+++ b/sharethis.module
@@ -94,7 +94,7 @@ function sharethis_node_view(array &$build, EntityInterface $node, EntityViewDis
   $data_options = $sharethis_manager->getOptions();
 
   // Get the full path to insert into the Share Buttons.
-  $path = $node->toUrl()->setAbsolute()->toString();
+  $path = \Drupal::request()->getRequestUri();
   $title = $node->getTitle();
   // Check where we want to display the ShareThis widget.
   switch ($sharethis_settings->get('location')) {
