Skip to content

Instantly share code, notes, and snippets.

@arielcr
Last active April 22, 2019 10:23
Show Gist options
  • Save arielcr/6022070 to your computer and use it in GitHub Desktop.
Save arielcr/6022070 to your computer and use it in GitHub Desktop.
How to pass custom parameters to a Facebook Share button
<a id="facebook-Link"
href="http://www.facebook.com/sharer.php?
s=100
&p[url]=the url you want to share
&p[images][0]=the image you want to share
&p[title]=the title you want to share
&p[summary]=the description/summary you want to share"
target="_blank">
<img src="your/path/to/facebook-icon.png"
alt="Share on Facebook" />
</a>
$('#facebook-Link').click(function () {
window.open($(this).attr('href'), 'sharer', 'width=626,height=436');
return false;
});
@cmohanraj10
Copy link

Image is not sharing and also can i share multiple images at a time?

@glassdimly
Copy link

@huykon
Copy link

huykon commented Apr 22, 2019

title not show :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment