Skip to content

Instantly share code, notes, and snippets.

@DracoBlue
Created September 18, 2012 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DracoBlue/3742295 to your computer and use it in GitHub Desktop.
Save DracoBlue/3742295 to your computer and use it in GitHub Desktop.
// IN
var values = {
"share_url": "http://dracoblue.net",
"share_title": "dracoblue's page",
"share_summary": "It's an awesome blog!",
"share_image_url": "http://dracoblue.net/avatar/120x120.jpg"
};
var share_parts = [
's=100',
'p[url]=' + encodeURIComponent(values.share_url),
'p[title]=' + encodeURIComponent(values.share_title),
'p[summary]=' + encodeURIComponent(values.share_summary),
'p[images][0]=' + encodeURIComponent(values.share_image_url)
];
return 'http://www.facebook.com/sharer.php?' + share_parts.join('&');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment