You are here

function fblikebutton_get_node_url in Facebook Like Button 8

Get the node url to add in the like button

Node id

2 calls to fblikebutton_get_node_url()
fblikebutton_node_view in ./fblikebutton.module
Implements hook_ENTITY_TYPE_view().
hook_node_links_alter in ./fblikebutton.module

File

./fblikebutton.module, line 73

Code

function fblikebutton_get_node_url($node_id) {
  $url_generator = \Drupal::urlGenerator();
  return $url_generator
    ->generateFromRoute('entity.node.canonical', array(
    'node' => $node_id,
  ), array(
    'absolute' => TRUE,
  ));
}