I removed and reimported all my plugins and the crash is gone. I still can’t successfully tweet… I tried many path names, even the one you suggested: string imgPath = “file://” + Application.streamingAssetsPath + “/banner.png”;
I see in the demo provided you use the persistentDataPath directory so I tried that and even that doesn’t work this is how I changed my code (but I can now see the image inside the tweet composer):
public void LogInComplete(TwitterSession session)
{
Application.CaptureScreenshot("Screenshot.png");
string imgPath = "file://" + Application.persistentDataPath + "/Screenshot.png";
string[] hashtags = { "#xxx", "#xxx" };
string msg = "...";
Twitter.Compose(session, imgPath, msg, hashtags);
}
Interestingly I got a different error when I tried the screenshot version:
E/Twitter: Unexpected response
java.lang.NullPointerException: Attempt to invoke interface method ‘boolean java.util.List.isEmpty()’ on a null object reference
07-19 15:13:58.518 6480-6480/? E/TweetUploadService: Post Tweet failed
com.twitter.sdk.android.core.TwitterApiException: HTTP request failed, Status: 401