Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Maybe I am a little dense, but I have created a custom module in the hope of using hook_service_links_alter to change the link passed to Facebook from a page. In my instance, I want to pass a specific link (not the node link) to Facebook when a user shares. Use case is video so the player appears on FB rather than the node.
However, implementing this fails and I can't see anywhere in service_links that the hook is invoked (e.g. module_invoke or module_invoke_all) - When does this hook fire?
My example is simple for now, just trying to print the links array:
function ishare_service_links_alter(&$links) {
dpm($links);
}
Am I missing something?
Comments
Comment #1
webkenny CreditAttribution: webkenny commentedLooks like this does fire after a cache-clear and when the links are initially built. Sorry for the noise. Thanks folks. It also helps if I look for the right function... i.e.
drupal_alter()