Example #1
0
    void OnGUIPost()
    {
        if (GUILayout.Button("Twitter Post", GUILayout.ExpandHeight(true)))
        {
            SocialXT.Post(SLRequest.SLServiceTypeTwitter,
                          "@vitapoly Your Unity Plugins rock!",
                          _logo,
                          "http://www.U3DXT.com"
                          );
        }

        if (GUILayout.Button("Facebook Post", GUILayout.ExpandHeight(true)))
        {
            SocialXT.Post(SLRequest.SLServiceTypeFacebook,
                          "Super fun games from vitapoly!",
                          null,
                          "http://www.vitapoly.com"
                          );
        }

        if (GUILayout.Button("Sina Weibo Post", GUILayout.ExpandHeight(true)))
        {
            SocialXT.Post(SLRequest.SLServiceTypeSinaWeibo,
                          "My first weibo from U3DXT Social by vitapoly.",
                          _logo,
                          "http://www.U3DXT.com"
                          );
        }
    }
    // ----------


    // called when the user attempts to make a social post, and passes the int 1 for twitter, 2 for facebook
    public static void SendSocialPost(int socialInt)
    {
        if (socialInt == 1)
        {
            SocialXT.Post(SLRequest.SLServiceTypeTwitter, "Fighting off waves of infection in SAVING TIMMY for iOS!", null, null);
        }
        else if (socialInt == 2)
        {
            SocialXT.Post(SLRequest.SLServiceTypeFacebook, "Fighting off waves of infection in SAVING TIMMY for iOS!", null, null);
        }
    }