Home > Flash, Life > Social Network Links

Social Network Links

April 11th, 2009

Wanted to post some Social media links on a site that I’m building but couldn’t find any good summary information, well, so here we go.

share_facebook

 

 
Facebook

http://www.facebook.com/sharer.php?u=’+encodeURIComponent(u)+’&t=’+encodeURIComponent(t) 

u = url to site
t = title of link

share_delicious

 

Delicious
“http://delicious.com/save?url=”+u+”&title=”+t;
u = url to site
t = title of link
m = metadata for link

share_myspace

 

MySpace
“http://www.myspace.com/Modules/PostTo/Pages/?u=”+u+”&sa=2&t=”+t+”&c=” 
u = url to site
t = title of link

share_digg

 

Digg
“http://digg.com/submit?url=”+u+”&title=”+t+”&bodytext=”; 
u = url to site
t = title of link

share_twitter

 

Twitter
“http://twitter.com/home/?status=”+t+” “+u
u = url to site
t = title of link

share_stumble

 

 
Stumbleupon

“http://stumbleupon.com/submit?url=”+u+”&title=”+t 
u = url to site
t = title of link

Createad a simple js file to use for html pages or why not Flash applications. Send the types; facebook,delicious,myspace,digg,twitter or stumbleupon. 
socialShare(type, link, title);

function socialShare(type,link,title,meta)
{
	var shareURL;
	var u = encodeURIComponent(link);
	var t = encodeURIComponent(title);
	var m = encodeURIComponent(meta);
	if(!m) m = t;
	var w = 626;
	var h = 436;
	switch(type)
	{
		case "facebook" :
			shareURL = "http://www.facebook.com/sharer.php?u="+u+"&t="+t;
			break;
		case "delicious" :
			shareURL = "http://delicious.com/save?url="+link+"&title="+title+"&q="+title+"&meta="+encodeURIComponent(m);
			break;
		case "myspace" :
			shareURL = "http://www.myspace.com/Modules/PostTo/Pages/?u="+link+"&sa=2&t="+title+"&c=";
			break;
		case "digg" :
			shareURL = "http://digg.com/submit?url="+link+"&title="+title+"&bodytext=";
			w = 730;
			h = 550;
			break;
		case "twitter" :
			w = 760;
			shareURL = "http://twitter.com/home/?status="+title+" "+link
			break;
		case "stumbleupon" :
			shareURL = "http://stumbleupon.com/submit?url="+link+"&title="+title
			break;
	}
	window.open(shareURL,"sharer","toolbar=0,status=0,scrollbars=yes,resizable=yes,width="+w+",height="+h);return false;
}

Download Social Share javascript.

Flash, Life , , ,

  1. dan
    September 25th, 2009 at 10:47 | #1

    Hey, thanks a lot for this link, it’s a very useful reference to keep linked as a summary.

    On a different note (and hopefully not too personal), I just started a blog of my own, and of course I don’t have any visitors yet. And I noticed that your archives go back a couple years and you’re very active in posting new content, and also that there aren’t many comments left on most of your posts. So to get to the point, what motivates you to keep posting?

    Whether you answer that or not, thanks again for the post; I really did save a link on my desktop for future reference.

  2. admin
    September 30th, 2009 at 19:28 | #2

    Hi Dan.
    Thanks for reading. Everyone blog;s for different reasons. I do it mostly for myself and not for others.
    I don’t post standard stuff that I read on other blogs but post idéas, tools and codes that I figure out for myself. So I use my own blog as a reference where I often go back to see what I actually did and how I did it. For e.g. my most viewed post “by myself” is how to setup Flex to use it as a developer tool for Flash applications.

    Be glad if you post link to your blog and wishes you the best of luck in happy blogging =)
    Cheers
    /Fredrick

  1. April 16th, 2009 at 03:00 | #1