Compose Tweets

Note

  • App Cards have been removed as of Twitter Kit 3
  • Twitter.Init () must be called before any Twitter methods are called

The Twitter Kit Composer is a lightweight composer which lets users compose Tweets from within your application. To start the composer call the Twitter.Compose method passing in a valid TwitterSession.

using TwitterKit.Unity;
...

public void StartComposer(TwitterSession session, String imageUri) {
      Twitter.Compose (session, imageUri, "My new high score!", new string[]{"#SpaceShooter"},
              (string tweetId) => { UnityEngine.Debug.Log ("Tweet Success, tweetId = " + tweetId); },
              (ApiError error) => { UnityEngine.Debug.Log ("Tweet Failed " + error.message); },
              () => { Debug.Log ("Compose cancelled"); }
      );
}