Hello Adam,
I’m actually using the same code of the demo:
public void LoginCompleteWithCompose(TwitterSession session) {
ScreenCapture.CaptureScreenshot("Screenshot.png");
UnityEngine.Debug.Log ("Screenshot location=" + Application.persistentDataPath + "/Screenshot.png");
string imageUri = "file://" + Application.persistentDataPath + "/Screenshot.png";
Twitter.Compose (session, imageUri, "Welcome to", new string[]{"#TwitterKitUnity"},
(string tweetId) => { UnityEngine.Debug.Log ("Tweet Success, tweetId=" + tweetId); },
(ApiError error) => { UnityEngine.Debug.Log ("Tweet Failed " + error.message); },
() => { Debug.Log ("Compose cancelled"); }
);
}
My question is how should I modified this code (probably the path to the screenshot.png) so I can use my own custom PNG instead of the screenshot.
I’ve tried:
string imageUri = "file://" + Application.persistentDataPath + "/Assets/Resources/myImage.png";
But It didn’t work.
It is not possible to pass the Texture directly instead of the path of the texture?
Thank you for your help