Twitter

Before you begin

Code Snippets

For a twitter post, you may provide text, URL and a picture as Texture2D. See the method described below:

using SA.iOS.Social;
...
ISN_Twitter.Post("My app Screenshot", "htpp://myUrl.com", screenshot);

You may also subscribe to a competition event to find out if a user has posted to Twitter. See the code snippet below:

using SA.iOS.Social;
...
public void ShareTwitter() {
    ISN_Twitter.Post("My app Screenshot", "htpp://myUrl.com", screenshot, HandleOnTwitterPostResult);
}

void HandleOnTwitterPostResult(SA_Result result) {
    if(result.IsSucceeded) {
        Debug.Log("Post Success!");
    } else {
        Debug.Log("Post Failed!");
    }
}

You can also post gif image to the twitter feed providing gif image device path.

ISN_Twitter.PostGif("My Gif", "gif file path");

Please, note that posting process will run in background and may take a while. The same OnPostResult action will be fired once a post request is completed.