Skip to content

Instantly share code, notes, and snippets.

@grimmdev
Created May 15, 2015 21:07
Show Gist options
  • Save grimmdev/90124447e8f7ab976ee2 to your computer and use it in GitHub Desktop.
Save grimmdev/90124447e8f7ab976ee2 to your computer and use it in GitHub Desktop.
Simple social network sharing class for any platform.
using UnityEngine;
using System.Collections;
public class Share {
public static void Facebook (string url)
{
Application.OpenURL ("https://www.facebook.com/sharer/sharer.php?u=" + url);
}
public static void Twitter (string tweet)
{
Application.OpenURL ("https://twitter.com/home?status=" + tweet);
}
public static void Google (string url)
{
Application.OpenURL ("https://plus.google.com/share?url=" + url);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment