Created
November 13, 2012 22:26
-
-
Save Sigmus/4068860 to your computer and use it in GitHub Desktop.
Share Facebook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function shareFacebook(title, summary, image, url) { | |
url = url || 'http://dev.digitalbox.cc/clientes/id-pernambucanas-natal2012/'; | |
window.open('http://www.facebook.com/sharer.php?s=100&p[images][0]=' + image + '&p[url]=' + url + '&p[title]=' + title +' &p[summary]=' + summary); | |
} | |
$(function(){ | |
$('[data-summary]').on('click', function(e){ | |
e.preventDefault(); | |
var $this = $(this), | |
data = $this.data(); | |
shareFacebook(data.title, data.summary, data.image); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment