Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411658 Posts in 69395 Topics- by 58451 Members - Latest Member: Monkey Nuts

May 15, 2024, 08:32:58 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Sharing button through URL call (method GET)
Pages: [1]
Print
Author Topic: Sharing button through URL call (method GET)  (Read 964 times)
Martin 2BAM
Level 10
*****


@iam2bam


View Profile WWW
« on: February 23, 2010, 07:40:31 PM »

I did my research to add "share buttons" to my flash games a while ago, and I'm going to share the list of formatted links that I gathered.

If you did your own research you can share what you found out, so we can build a repository of social/share network simple-URL api.

(Facebook can get extra info from some special meta-tags in the HTML head)



URL: URL to your site. TITLE: Custom title for your site (not supported by all).

facebook
http://www.facebook.com/share.php?u=URL&t=TITLE

twitter
http://twitter.com/home?status=URL+TITLE

myspace
http://www.myspace.com/Modules/PostTo/Pages/?u=URL&t=TITLE&c=<a+href=URL>Title</a>

delicious
http://delicious.com/save?url=URL&title=TITLE

stumbleupon
http://www.stumbleupon.com/submit?url=URL



For Flash/AS3 guys:
Code:
_makeURLForPage = new Object;
_makeURLForPage["facebook"] = function(URL:String, Title:String):String {
return "http://www.facebook.com/share.php?u="+URL+"&t="+Title; };

_makeURLForPage["twitter"] = function(URL:String, Title:String):String {
return "http://twitter.com/home?status="+URL+"+"+Title; };

_makeURLForPage["myspace"] = function(URL:String, Title:String):String {
return "http://www.myspace.com/Modules/PostTo/Pages/?u="+URL+"&t="+Title+"&c=<a+href="+URL+">"+Title+"</a>"; };

_makeURLForPage["delicious"] = function(URL:String, Title:String):String {
return "http://delicious.com/save?url="+URL+"&title="+Title; };

_makeURLForPage["stumbleupon"] = function(URL:String, Title:String):String {
return "http://www.stumbleupon.com/submit?url="+URL; };

Usage
Code:
theURLToOpen = _makeURLForPage["facebook"](urlencode("http://my.site.com"), urlencode("My awesome site"));



Regards  Beer!
« Last Edit: February 23, 2010, 08:00:00 PM by nitram_cero » Logged

Working on HeliBrawl
Sos
Level 8
***


I make bad games


View Profile WWW
« Reply #1 on: February 24, 2010, 07:25:11 AM »

cool, now let's spam some!
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic