Skip to content

Instantly share code, notes, and snippets.

@guicheffer guicheffer/socialmedia.js
Last active Jun 7, 2016

What would you like to do?
social media (share) functions
function shareFacebook(title, summary, url, image) {
url = ['[summary]=', encodeURI(summary), '&p[title]=', encodeURI(title), '&p[url]=', encodeURI(url), '&p[images][0]=', encodeURI(image)];''), 'facebook', 'height=300,width=600');
function shareFacebookFBui(options, callbackShare) {
var defaults = {
method: 'feed',
link: '',
picture: '',
name: 'Facebook Dialogs'
/* merge defaults and options, without modifying defaults */
var obj = $.extend({}, defaults, options);
FB.ui(obj, callbackShare);
function shareTwitter (text, url) {
url = ['', encodeURI(text), '&url=', encodeURI(url)];''), 'twitter', 'height=300,width=600');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.