yanknudtskov
11/21/2014 - 9:47 AM

Generate a Facebook Share Button

Generate a Facebook Share Button

function get_facebook_share_button($url, $share_message = '') {
  $output = '';
  $output = '<a class="facebook-share" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u='.$url.'" alt="'.$share_message.'" title="'.$share_message.'"></a>';
  return $output;
}