Social Network Links
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.
Facebook
http://www.facebook.com/sharer.php?u=’+encodeURIComponent(u)+’&t=’+encodeURIComponent(t)
u = url to site
t = title of link
Delicious
“http://delicious.com/save?url=”+u+”&title=”+t;
u = url to site
t = title of link
m = metadata for link
MySpace
“http://www.myspace.com/Modules/PostTo/Pages/?u=”+u+”&sa=2&t=”+t+”&c=”
u = url to site
t = title of link
Digg
“http://digg.com/submit?url=”+u+”&title=”+t+”&bodytext=”;
u = url to site
t = title of link
Twitter
“http://twitter.com/home/?status=”+t+” “+u
u = url to site
t = title of link
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; }