示例#1
0
    public void Share(string providerName)
    {
        var message = E7.Localization.GetString("share_message") + messageInputField.text;

        switch (providerName)
        {
        default:
        case "Facebook":
            UM_ShareUtility.FacebookShare(message, texture);
            break;

        case "Twitter":
            UM_ShareUtility.TwitterShare(message, texture);
            break;
        }
    }
示例#2
0
    private IEnumerator PostTwitterScreenshot()
    {
        yield return(new WaitForEndOfFrame());

        // Create a texture the size of the screen, RGB24 format
        int       width  = Screen.width;
        int       height = Screen.height;
        Texture2D tex    = new Texture2D(width, height, TextureFormat.RGB24, false);

        // Read screen contents into the texture
        tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);
        tex.Apply();

        UM_ShareUtility.TwitterShare("My Highscore", tex);

        Destroy(tex);
    }
示例#3
0
    void OnGUI()
    {
        float StartY = 20;
        float StartX = 10;

        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Twitter", style);

        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post"))
        {
            UM_ShareUtility.TwitterShare("Titter posting test");
        }

        StartX += 170;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post Screehshot"))
        {
            StartCoroutine(PostTwitterScreenshot());
        }


        StartY += 55;
        StartX  = 10;
        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Facebook", style);


        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post"))
        {
            UM_ShareUtility.FacebookShare("Facebook posting test");
        }

        StartX += 170;

        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post Screehshot"))
        {
            StartCoroutine(PostFBScreenshot());
        }


        StartX += 170;

        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post Image"))
        {
            UM_ShareUtility.FacebookShare("Hello world", textureForPost);
        }



        StartY += 55;
        StartX  = 10;
        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Mail", style);


        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Send Mail"))
        {
            UM_ShareUtility.SendMail("My E-mail Subject", "This is my text to share", "[email protected], [email protected]");
        }

        StartX += 170;

        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Send Mail with image"))
        {
            UM_ShareUtility.SendMail("My E-mail Subject", "This is my text to share <br> <strong> html text </strong>", "[email protected], [email protected]", textureForPost);
        }



        StartY += 55;
        StartX  = 10;
        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Native Sharing", style);


        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Text"))
        {
            UM_ShareUtility.ShareMedia("Title", "Some text to share");
        }

        StartX += 170;

        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Screehshot"))
        {
            StartCoroutine(PostScreenshot());
        }

        StartY += 55;
        StartX  = 10;
        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Whatsapp", style);

        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Start Share"))
        {
            UM_ShareUtility.WhatsappShare("This is my text to share", textureForPost);
        }
    }
示例#4
0
 public override void OnEnter()
 {
     UM_ShareUtility.TwitterShare(status.Value, texture.Value as Texture2D);
     Finish();
 }
示例#5
0
 public void OnTwShare()
 {
     OnShareClose();
     UM_ShareUtility.TwitterShare(url, textureForPost);
 }
    // twitter sharing
    public void postTextureTwitter()
    {
        UM_ShareUtility.TwitterShare("@thebridebox " + "#thebridebox", screenCap);
//		analyticsControl.screenshotShare("twitter");
    }
    // twitter sharing
    public void postTextureTwitter()
    {
        UM_ShareUtility.TwitterShare("@TeamLaunchable " + "#launchable", screenCap);
//		analyticsControl.screenshotShare("twitter");
    }
示例#8
0
 public void OnTwShare()
 {
     UM_ShareUtility.TwitterShare("market://details?id=com.peakrainbow.missionday");        //, textureForPost);
 }