Skip to content

Instantly share code, notes, and snippets.

@nipundavid
Created July 17, 2015 13:20
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 nipundavid/1672800306750778e0dc to your computer and use it in GitHub Desktop.
Save nipundavid/1672800306750778e0dc to your computer and use it in GitHub Desktop.
public void twitter(int score) {
Share ("Very nice time killer game, created a highScore"+score,"","","","");
}
const string Address = "http://twitter.com/intent/tweet";
private void Share(string text, string url,
string related,string via, string hashtags, string lang="en")
{
Application.OpenURL(Address +
"?text=" + WWW.EscapeURL(text) +
"&url=" + WWW.EscapeURL(url) +
"&related=" + WWW.EscapeURL(related) +
"&amp:via="+WWW.EscapeURL(via)+
"&amp:via="+WWW.EscapeURL(hashtags)+
"&lang=" + WWW.EscapeURL(lang));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment