Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save INDIAN2020/19488607a1bdea235fb99f836021ab4e to your computer and use it in GitHub Desktop.
Save INDIAN2020/19488607a1bdea235fb99f836021ab4e to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment